diff options
Diffstat (limited to 'crypto/src/asn1/x509')
-rw-r--r-- | crypto/src/asn1/x509/AttributeCertificate.cs | 7 | ||||
-rw-r--r-- | crypto/src/asn1/x509/CertificateList.cs | 7 | ||||
-rw-r--r-- | crypto/src/asn1/x509/KeyUsage.cs | 5 | ||||
-rw-r--r-- | crypto/src/asn1/x509/ReasonFlags.cs | 7 | ||||
-rw-r--r-- | crypto/src/asn1/x509/SubjectPublicKeyInfo.cs | 2 | ||||
-rw-r--r-- | crypto/src/asn1/x509/X509CertificateStructure.cs | 5 |
6 files changed, 23 insertions, 10 deletions
diff --git a/crypto/src/asn1/x509/AttributeCertificate.cs b/crypto/src/asn1/x509/AttributeCertificate.cs index 5f85910da..41893b6b4 100644 --- a/crypto/src/asn1/x509/AttributeCertificate.cs +++ b/crypto/src/asn1/x509/AttributeCertificate.cs @@ -63,7 +63,12 @@ namespace Org.BouncyCastle.Asn1.X509 get { return signatureValue; } } - /** + public byte[] GetSignatureOctets() + { + return signatureValue.GetOctets(); + } + + /** * Produce an object suitable for an Asn1OutputStream. * <pre> * AttributeCertificate ::= Sequence { diff --git a/crypto/src/asn1/x509/CertificateList.cs b/crypto/src/asn1/x509/CertificateList.cs index 0412e0816..567cf132a 100644 --- a/crypto/src/asn1/x509/CertificateList.cs +++ b/crypto/src/asn1/x509/CertificateList.cs @@ -80,7 +80,12 @@ namespace Org.BouncyCastle.Asn1.X509 get { return sig; } } - public int Version + public byte[] GetSignatureOctets() + { + return sig.GetOctets(); + } + + public int Version { get { return tbsCertList.Version; } } diff --git a/crypto/src/asn1/x509/KeyUsage.cs b/crypto/src/asn1/x509/KeyUsage.cs index fef04e8b9..aeaffb708 100644 --- a/crypto/src/asn1/x509/KeyUsage.cs +++ b/crypto/src/asn1/x509/KeyUsage.cs @@ -53,9 +53,8 @@ namespace Org.BouncyCastle.Asn1.X509 * allowed uses for the key. * e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment) */ - public KeyUsage( - int usage) - : base(GetBytes(usage), GetPadBits(usage)) + public KeyUsage(int usage) + : base(usage) { } diff --git a/crypto/src/asn1/x509/ReasonFlags.cs b/crypto/src/asn1/x509/ReasonFlags.cs index f204c36aa..ad45e84ae 100644 --- a/crypto/src/asn1/x509/ReasonFlags.cs +++ b/crypto/src/asn1/x509/ReasonFlags.cs @@ -31,13 +31,12 @@ namespace Org.BouncyCastle.Asn1.X509 * @param reasons - the bitwise OR of the Key Reason flags giving the * allowed uses for the key. */ - public ReasonFlags( - int reasons) - : base(GetBytes(reasons), GetPadBits(reasons)) + public ReasonFlags(int reasons) + : base(reasons) { } - public ReasonFlags( + public ReasonFlags( DerBitString reasons) : base(reasons.GetBytes(), reasons.PadBits) { diff --git a/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs b/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs index 8ce4b2762..477329b7e 100644 --- a/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs +++ b/crypto/src/asn1/x509/SubjectPublicKeyInfo.cs @@ -75,7 +75,7 @@ namespace Org.BouncyCastle.Asn1.X509 */ public Asn1Object GetPublicKey() { - return Asn1Object.FromByteArray(keyData.GetBytes()); + return Asn1Object.FromByteArray(keyData.GetOctets()); } /** diff --git a/crypto/src/asn1/x509/X509CertificateStructure.cs b/crypto/src/asn1/x509/X509CertificateStructure.cs index c8558ae61..6e7c85de6 100644 --- a/crypto/src/asn1/x509/X509CertificateStructure.cs +++ b/crypto/src/asn1/x509/X509CertificateStructure.cs @@ -119,6 +119,11 @@ namespace Org.BouncyCastle.Asn1.X509 get { return sig; } } + public byte[] GetSignatureOctets() + { + return sig.GetOctets(); + } + public override Asn1Object ToAsn1Object() { return new DerSequence(tbsCert, sigAlgID, sig); |