tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/111227-gpg-9-invalid-expire-date-gpg-keychain-for-macGPGTools: Discussion 2021-05-31T19:27:35Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T15:39:55Z2021-05-18T15:39:56Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Invalid expire date--GPG Keychain for Mac</p>
<p>Issue:<br>
Lost my GPG private key, and can't create new GPG Keychain key due to "gpg: -:9: invalid expire date"</p>
<p>Background:<br>
I lost my GPG private key. I had actually forgotten I even had one until a few days ago when I started getting encrypted notifications emails from Facebook. After investigating I found I had a PGP Public key attached to my FB account. Looking back through my passwords, etc., I found a GPG Keychain Password but no GPG Keychain Private Key. I also found I had a GPG/PGP public key stored on the GPG Keychain Servers.</p>
<p>Actions:<br>
I looked through GPGTools Support for the process of handling a lost Private Key. I found I need to revoke the key using the revocation certificate stored in "~/.gnupg/RevCerts" and then create a new key.</p>
<p>Next Steps:<br>
I realise I can't recover the private key and hence I can't access any emails previously encrypted with it. That's as it is and can't be changed.</p>
<p>I also can't revoke the old key as the machine that GPGKeychain was originally installed on was wiped and sold on six month plus ago, so I don't have the revocation certificate.</p>
<p>So I moved on to try and create a new keyed that's where I'm getting the failure. I get a pop that reads:</p>
<p>Oops, something went wrong. There was a problem creating your key.<br>
Generate new key failed!<br>
Code = 0<br>
Error text:<br>
gpg: -:9: invalid expire date</p>
<p>So having said all that, how do I create a new key now?</p>
<p>Thank you.</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:05:18Z2021-05-18T17:05:18Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Hi Peter,</p>
<p>welcome to the GPGTools support platform. Sorry to hear you are having problems using GPG Suite.</p>
<p>Do you still have a backup of your old mac? If yes you should be able to maybe retrieve your secret key and or the revocation certificate.</p>
<p>The error you are seeing is curious. Which version of macOS are you running?</p>
<p>Could you please download and install our <a href="https://releases.gpgtools.org/nightlies/">latest hotfix GPG Suite</a> and see if that solves your problem.</p>
<p>All the best,<br>
Steve</p>
<p>Disclaimer: Hotfixes are GPG Suite builds containing our latest source code, so bugs and crashes may occur.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:42:19Z2021-05-18T17:42:20Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Hello Steve,</p>
<p>Thank you for responding so quickly. The answer re. backups is unfortunately no. I tend not to do system backups, just my data as I rely on Apple iCloud to keep copies of Keychain, etc. I realise that I have lost my old encryption and any emails that have ever been encrypted with it, which is annoying but not too painful. Basically, I had forgotten that I had even used GPGKeychain in the past.</p>
<p>My concern here isn’t about access to my old private key, it’s about creating a new key and this expiry date error.</p>
<p>As regards my machine, specs are:</p>
<p>Hardware Overview:</p>
<p>Model Name: Mac mini Model Identifier: Macmini9,1 Chip: Apple M1</p>
<p>System Software Overview:</p>
<p>System Version: macOS 11.3.1 (20E241) Kernel Version: Darwin 20.4.0 Boot Volume: Macintosh HD Boot Mode: Normal</p>
<p>Regards,</p>
<p>Peter.</p></div>Peter Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:45:02Z2021-05-18T17:45:02Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Had you installed the nightly build and checked if that allows for creation of a new key?</p>
<p>Backups are actually cheap - harddrives and even ssds are very affordable and macOS comes with Time Machine or if you want a bootable backup you can use CarbonCopyCloner or SuperDuper.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:50:55Z2021-05-18T17:50:56Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Re. backups, thank you. It's my way of doing things here that's the issue. I actually have plenty of backup space; just, it now seems, not an appropriate backup procedure. Isn't it always the way that you find out the gaps in a process when you fall down one of the resultant holes!!</p>
<p>As regards the version of GPGKeychain. I just downloaded and installed the latest released "production" build from the GPGTools website this afternoon. I haven't looked for any pre-release versions.</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:57:19Z2021-05-18T17:57:21Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>I've just been trying to find the nightly or beta downloads but can't. I just get the released build. Can you send me a link to either please?</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T17:58:44Z2021-05-18T17:58:44Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Link was in my first reply:<br>
Could you please download and install our <a href="https://releases.gpgtools.org/nightlies/">latest hotfix GPG Suite</a> and see if that solves your problem.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T18:03:26Z2021-05-18T18:03:27Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Apologies is this is a stupid question. Do I install over the top of the existing installation or do I need to uninstall the existing and clean install the hotfix?</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T18:04:25Z2021-05-18T18:04:25Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>No need to uninstall. You can run the installer over the existing installation.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T18:08:42Z2021-05-18T18:08:43Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Same error.</p>
<p>BTW ... I have also tried with different dates, including the expiry date of my lost key.</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T18:18:59Z2021-05-18T18:18:59Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Can you send a screenshot of your system time from system preferences.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-18T18:28:05Z2021-05-21T19:26:17Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Attached.</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-19T02:18:19Z2021-05-19T02:18:20Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Just solved this same problem by going into System Preferences > Date & Time > Open Language & Region and setting my region to the United States.</p>
<p>My guess is the problem had to do with my country writing dates as dd/mm/yyyy whereas the US uses mm/dd/yyyy</p></div>Josetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-19T08:37:38Z2021-05-19T08:37:39Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Thank you Jose that also fixed it for me.</p>
<p>Suggest that expecting the expiry date to be in US format and for international customers to switch their location to being United States is a bug.</p></div>Peter C. Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T10:42:20Z2021-05-25T10:42:20Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Thanks Jose for chiming in here and providing important info to debug this.</p>
<p>Using german on a test system here which uses dates as dd.mm.yyyy and had no trouble creating new keys.</p>
<p>Then switched region to America > Barbados using dd/mm/yyyy and was also able to create a key.</p>
<p>Could you both provide a screenshot of System Preferences > Language & Region with the problematic settings which resulted in GPG Keychain being unable to create new keys.</p>
<p>Thank you,<br>
Steve</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T10:58:42Z2021-05-25T10:58:44Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>As requested …</p>
<p>Kind regards</p></div>Peter Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T11:12:00Z2021-05-25T11:14:48Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>I am still unable to reproduce. Using macOS 11.4 and GPG Suite 2021.1 for my test.</p>
<p>Have you already updated to macOS 11.4 and 2021.1 and the issue is still persisting for you?</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T12:15:21Z2021-05-25T12:15:22Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Current versions …</p>
<p>I haven't tried to reproduce the issue since applying Jose's fix as it also worked for me and I was able to create my key.</p>
<p>Kind regards,</p>
<p>Peter.</p></div>Peter Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T12:16:04Z2021-05-25T12:16:05Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>BTW … In case I didn’t mention in any other update, I’m using a MacMini M1.</p></div>Peter Pughtag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-25T12:17:22Z2021-05-25T12:17:22Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>You are running macOS 11.3.1 so 11.4 should be available.</p>
<p>And you are runnning GPG Suite nightly for which 2021.1 stable should be available.</p>
<p>Could you update both and then see if you are still able to reproduce the key creation problem? You can create a key with any email and not upload it to the key servers just for testing.</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/492033322021-05-31T19:27:32Z2021-05-31T19:27:32Zgpg: -:9: invalid expire date--GPG Keychain for Mac<div><p>Closing, since no further user feedback was received. Should your problem persist, feel free to re-open this discussion any time.</p>
<p>All the best,<br>
Steve</p></div>Steve