The public and private keys cannot be used to encrypt and sign a message

[PASS] PHP GPG Module is installed and loaded.
[PASS] The environment variable GNUPGHOME is set to /var/www/.gnupg.
[PASS] The directory /var/www/.gnupg containing the keyring is writable by the webserver user.
[PASS] The server gpg key is not the default one
[PASS] The public key file is defined in config/passbolt.php and readable.
[PASS] The private key file is defined in config/passbolt.php and readable.
[PASS] The server key fingerprint matches the one defined in config/passbolt.php.
[PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
[PASS] There is a valid email id defined for the server key.
[PASS] The public key can be used to encrypt a message.
[FAIL] The private key cannot be used to sign a message
[HELP] Make sure that the server private key is valid and that there is no passphrase.
[HELP] Make sure you imported the private server key in the keyring of the webserver user.
[HELP] you can try:
[HELP] sudo su -s /bin/bash -c “gpg --home /var/www/.gnupg --import /var/www/passbolt/config/gpg/serverkey_private.asc” www-data
[FAIL] The public and private keys cannot be used to encrypt and sign a message
[FAIL] The private key cannot be used to decrypt a message
[FAIL] The private key cannot be used to decrypt and verify a message
[FAIL] The public key cannot be used to verify a signature.

Application configuration

[PASS] Using latest passbolt version (3.1.0).
[PASS] Passbolt is configured to force SSL use.
[PASS] App.fullBaseUrl is set to HTTPS.
[PASS] Selenium API endpoints are disabled.
[PASS] Search engine robots are told not to index content.
[PASS] Registration is closed, only administrators can add users.
[PASS] Serving the compiled version of the javascript app
[PASS] All email notifications will be sent.

7 error(s) found. Hang in there!

I found this link

that talks about adding a password in the key but how do you do that.
Can any one help?

Hi @frankpsf that link’s comment was actually saying that the problem was they had added a password. Passbolt needs to use a key without a password.

OH
than I don’t know what is wrong?

What else can cause those 7 errors

Did you try running the suggested command in the [HELP] section already?

Hi Garrett
I did but that didn’t help.

Right now I’m using in Demo Mode.

Also what i did notice
the emails are not being sent out.

I did the test
./bin/cake passbolt send_test_email --recipient=email_address
and I receive those emails.

but I’m not receiving the emails aside from that.

How did you create your keys?

For email troubleshooting: Passbolt Help | Why are my emails not being sent?

This is the list of why emails are not sent. If it’s a package install then the cron job is automatically set up for you. You should check to see it is there though.

I ran the following

gpg --gen-key

Using fake email here

gpg --list-keys --fingerprint | grep -i -B 2 'SERVER_KEY@EMAIL.TEST'
gpg --armor --export-secret-keys SERVER_KEY@EMAIL.TEST > /var/www/passbolt/config/gpg/serverkey_private.asc
gpg --armor --export SERVER_KEY@EMAIL.TEST > /var/www/passbolt/config/gpg/serverkey.asc

Frank Ferreira