greenbone / gvmd

Greenbone Vulnerability Manager - The database backend for the Greenbone Community Edition
GNU Affero General Public License v3.0
286 stars 154 forks source link

[9.0.1] Unable to send mails encrypt using S/MIME certificates #1090

Closed tuxmaster5000 closed 3 years ago

tuxmaster5000 commented 4 years ago

Expected behavior

That it is possible to send encrypted mails using S/MIME certificates. Using an gpg public key works fine.

Actual behavior

No mail is generated, because the certificate is not found.

Steps to reproduce

  1. Log into gsa
  2. Import an new X.509 certificate under credentials.
  3. Add an new email alert using encrypted mail and the certificate
  4. Test the alert.

GVM versions

gsa: Greenbone Security Assistant 9.0.1

gvm: Greenbone Vulnerability Manager 9.0.1

openvas-scanner: OpenVAS 7.0.1

gvm-libs: gvm-libs 11.0.1

Environment

Operating system: CentOS 7.8

Installation method / source: Using github sources

Logfiles

/var/log/greenbone/gvmd/gvmd.log:

util gpgme:WARNING:2020-05-15 08h31.50 CEST:25464: find_email_encryption_key: No suitable key found for foo@foo.foo util gpgme:WARNING:2020-05-15 08h31.50 CEST:25464: encrypt_stream_internal: Could not find certificate for encryption md manage:WARNING:2020-05-15 08h31.50 CEST:25464: email_encrypt_smime: encryption failed md manage:WARNING:2020-05-15 08h31.50 CEST:25464: email: S/MIME encryption failed

bjoernricks commented 3 years ago

Should be re-tested with current version. If it is still valid please re-open.

gs4711 commented 3 years ago

Jun 9 10:47:21 iz-ad-41 gvmd[4204]: find_email_encryption_key: Found matching UID for DummyUser@h-ka.de Jun 9 10:47:21 iz-ad-41 gvmd[4204]: g_lstat(/tmp/gvmd-gpg-V96Z15/.#lk0x000055d0335a17b0.iz-ad-41.4209) failed - No such file or directory Jun 9 10:47:21 iz-ad-41 gvmd[4204]: Failed to remove .#lk0x000055d0335a17b0.iz-ad-41.4209 from /tmp/gvmd-gpg-V96Z15! Jun 9 10:47:21 iz-ad-41 gvmd[4204]: email_encrypt_smime: encryption failed Jun 9 10:47:21 iz-ad-41 gvmd[4204]: email: S/MIME encryption failed Jun 9 10:47:21 iz-ad-41 command-wrapper[20599]: encrypt_stream_internal: gpgme_op_encrypt failed: Missing issuer certificate

Still seems to be broken.