diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-01-13 17:32:42 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-01-13 17:32:42 +0700 |
commit | 4cb781e9faa84458e72ede4aac15226af44b0648 (patch) | |
tree | 7f8ee8bc0672ee851fcb9046239bdb503d0a04b8 | |
parent | Improve OAEP const-time decoding (diff) | |
download | BouncyCastle.NET-ed25519-4cb781e9faa84458e72ede4aac15226af44b0648.tar.xz |
Handle RevocationKey and RevocationReason
-rw-r--r-- | crypto/src/bcpg/SignatureSubpacketsReader.cs | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/crypto/src/bcpg/SignatureSubpacketsReader.cs b/crypto/src/bcpg/SignatureSubpacketsReader.cs index 45dc96885..86ad11207 100644 --- a/crypto/src/bcpg/SignatureSubpacketsReader.cs +++ b/crypto/src/bcpg/SignatureSubpacketsReader.cs @@ -90,33 +90,37 @@ namespace Org.BouncyCastle.Bcpg switch (type) { - case SignatureSubpacketTag.CreationTime: - return new SignatureCreationTime(isCritical, isLongLength, data); - case SignatureSubpacketTag.KeyExpireTime: - return new KeyExpirationTime(isCritical, isLongLength, data); - case SignatureSubpacketTag.ExpireTime: - return new SignatureExpirationTime(isCritical, isLongLength, data); - case SignatureSubpacketTag.Revocable: - return new Revocable(isCritical, isLongLength, data); - case SignatureSubpacketTag.Exportable: - return new Exportable(isCritical, isLongLength, data); - case SignatureSubpacketTag.IssuerKeyId: - return new IssuerKeyId(isCritical, isLongLength, data); - case SignatureSubpacketTag.TrustSig: - return new TrustSignature(isCritical, isLongLength, data); - case SignatureSubpacketTag.PreferredCompressionAlgorithms: - case SignatureSubpacketTag.PreferredHashAlgorithms: - case SignatureSubpacketTag.PreferredSymmetricAlgorithms: - return new PreferredAlgorithms(type, isCritical, isLongLength, data); - case SignatureSubpacketTag.KeyFlags: - return new KeyFlags(isCritical, isLongLength, data); - case SignatureSubpacketTag.PrimaryUserId: - return new PrimaryUserId(isCritical, isLongLength, data); - case SignatureSubpacketTag.SignerUserId: - return new SignerUserId(isCritical, isLongLength, data); - case SignatureSubpacketTag.NotationData: - return new NotationData(isCritical, isLongLength, data); - } + case SignatureSubpacketTag.CreationTime: + return new SignatureCreationTime(isCritical, isLongLength, data); + case SignatureSubpacketTag.KeyExpireTime: + return new KeyExpirationTime(isCritical, isLongLength, data); + case SignatureSubpacketTag.ExpireTime: + return new SignatureExpirationTime(isCritical, isLongLength, data); + case SignatureSubpacketTag.Revocable: + return new Revocable(isCritical, isLongLength, data); + case SignatureSubpacketTag.Exportable: + return new Exportable(isCritical, isLongLength, data); + case SignatureSubpacketTag.IssuerKeyId: + return new IssuerKeyId(isCritical, isLongLength, data); + case SignatureSubpacketTag.TrustSig: + return new TrustSignature(isCritical, isLongLength, data); + case SignatureSubpacketTag.PreferredCompressionAlgorithms: + case SignatureSubpacketTag.PreferredHashAlgorithms: + case SignatureSubpacketTag.PreferredSymmetricAlgorithms: + return new PreferredAlgorithms(type, isCritical, isLongLength, data); + case SignatureSubpacketTag.KeyFlags: + return new KeyFlags(isCritical, isLongLength, data); + case SignatureSubpacketTag.PrimaryUserId: + return new PrimaryUserId(isCritical, isLongLength, data); + case SignatureSubpacketTag.SignerUserId: + return new SignerUserId(isCritical, isLongLength, data); + case SignatureSubpacketTag.NotationData: + return new NotationData(isCritical, isLongLength, data); + case SignatureSubpacketTag.RevocationReason: + return new RevocationReason(isCritical, isLongLength, data); + case SignatureSubpacketTag.RevocationKey: + return new RevocationKey(isCritical, isLongLength, data); + } return new SignatureSubpacket(type, isCritical, isLongLength, data); } |