Page MenuHome GnuPG

Fix addition of new GPG keys to LDAP
Needs ReviewPublic

Authored by gray on Apr 3 2019, 11:19 AM.
This revision needs review, but there are no reviewers specified.

Details

Summary

When a pgpKeyInfo object is being added to LDAP, only a small subset of attributes from addlist is added to it. This means that
to actually register one's GPG key one has to repeat submission twice: fist time to create a new object with limited subset of
attributes and second time so that ks_ldap_put performs a ldap_modify_s which will actually update the remaining attributes.

This patch fixes it.

Test Plan

The issue is easily reproducible. Just run gpg --keyserver ldap://IPADDR --send-keys KEYID: you'll end up with an object in LDAP having only the pgpKey and pgpCertID attributes. Second submission with of the same key will add the remaining attributes.

With this patch applied, the complete object is created after the first submission.

Diff Detail

Repository
rG GnuPG
Lint
Lint Skipped
Unit
Unit Tests Skipped