1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 22:32:07 +01:00

Accept GENERIC_CERTIFICATION signatures when negotiating algorithms

This commit is contained in:
Paul Schaub 2021-01-19 15:36:06 +01:00
parent 10f1650d06
commit 2009f7f7e3
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -38,7 +38,9 @@ public class OpenPgpKeyAttributeUtil {
continue;
}
if (signature.getSignatureType() == SignatureType.POSITIVE_CERTIFICATION.getCode()) {
SignatureType signatureType = SignatureType.valueOf(signature.getSignatureType());
if (signatureType == SignatureType.POSITIVE_CERTIFICATION
|| signatureType == SignatureType.GENERIC_CERTIFICATION) {
int[] hashAlgos = signature.getHashedSubPackets().getPreferredHashAlgorithms();
for (int h : hashAlgos) {
hashAlgorithms.add(HashAlgorithm.fromId(h));