tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/54834-macgpg2-encryptsign-failedGPGTools: Discussion 2019-07-01T09:38:26Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/430415862017-07-20T11:44:18Z2017-07-20T11:44:18ZMacGPG2: encrypt/sign failed<div><p>Hi Zac,</p>
<p>welcome to the GPGTools support platform. Sorry you are having problems using GPG Suite.</p>
<p>Is it intentional that you have no GPGMail on your machine? How are you trying to encrypt the message? Can you please give exact steps.</p>
<p>All the best,<br>
steve</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/430415862017-07-21T08:09:42Z2017-07-21T08:09:45ZMacGPG2: encrypt/sign failed<div><p>Hello,<br>
I use the command 'OpenPGP: Encrypt' to encrypt messages, it has worked in<br>
the past so not sure what's gone wrong.</p>
<p>thanks,</p></div>Zac Shepherdtag:gpgtools.tenderapp.com,2011-11-04:Comment/430415862017-07-21T15:32:15Z2017-07-21T15:32:15ZMacGPG2: encrypt/sign failed<div><p>First, let's check if your key is ok:</p>
<ol>
<li>open GPG Keychain<br></li>
<li>double click your sec/pub key<br></li>
<li>create a screenshot of the <strong>key tab</strong> (⇧⌘4 + drag w mouse)<br></li>
<li>create a screenshot of the <strong>subkey tab</strong><br></li>
<li>attach both screenshots to your discussion by visiting it in your browser</li>
</ol>
<p>Should your key have expired, please re-new the expiration date.</p>
<p>Should your subkey be expired, please create a new subkey.</p>
<ol>
<li>navigate to the subkey tab<br></li>
<li>click the "+" button below<br></li>
<li>confirm with "Generate subkey"</li>
</ol>
<p>After that send a signed and encrypted test mail to yourself. Are you able to decrypt and verify the signature successfully?</p>
<p>In case your key resides on the public key servers, don't forget to upload your updated key, so that the changes are reflected on the key servers.</p>
<p>The error message "Decryption failed! Code = 0" indicateds gpg was unable to determine a specific cause for the problem.</p>
<p>Let’s test gpg encryption and decryption in the terminal:</p>
<ol>
<li>click spotlight at the top right menubar and type 'terminal'<br></li>
<li>open Terminal.app by pressing enter<br></li>
<li>in the new terminal window<br></li>
<li>paste the following without the ' 'gpg2 -ae --default-recipient-self <<<OK'<br></li>
<li>a PGP message will be created<br></li>
<li>paste the following without the ' 'gpg2 -ae --default-recipient-self <<<OK | gpg2 -d'<br></li>
<li>you will be asked for your password (if your password is still in the cache or stored in the macOS keychain you will not be asked)<br></li>
<li>when everything is fine you should see the word "OK" in your terminal - in that case decryption worked as expected</li>
</ol>
<p>Best regards,<br>
Steve</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/430415862017-07-21T16:28:19Z2017-07-21T16:28:21ZMacGPG2: encrypt/sign failed<div><p>I had an expired subkey, your debugging steps helped me to find. Thanks very much.</p></div>Zac Shepherdtag:gpgtools.tenderapp.com,2011-11-04:Comment/430415862017-07-21T16:37:38Z2017-07-21T16:37:38ZMacGPG2: encrypt/sign failed<div><p>Perfect. Glad, this is solved for you.</p>
<p>We have a ticket to provide better information when a subkey expires. I connected this discussion with the existing ticket. That means, should this discussion get closed, it will be re-opened as soon as the ticket is closed. That way you'll stay in the loop and get notified as soon as we have news. Feel free to open a new discussions should you run into further problems or need assistance.</p>
<p>I'm closing this discussion. Should you need further assistance or have questions you can re-open this discussion here or open a new one any time.</p>
<p>Best, steve</p></div>Steve