diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-06-04 16:55:26 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-06-04 16:55:26 +0700 |
commit | 3eb93b423abeefbdc03f0ecc38751d76428ba23e (patch) | |
tree | f364f857c54f65eb59462560b1f282b896eecf8b /crypto/src/asn1/x509/AuthorityKeyIdentifier.cs | |
parent | Port LinkedCertificate from bc-java (diff) | |
download | BouncyCastle.NET-ed25519-3eb93b423abeefbdc03f0ecc38751d76428ba23e.tar.xz |
Refactoring
Diffstat (limited to 'crypto/src/asn1/x509/AuthorityKeyIdentifier.cs')
-rw-r--r-- | crypto/src/asn1/x509/AuthorityKeyIdentifier.cs | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/crypto/src/asn1/x509/AuthorityKeyIdentifier.cs b/crypto/src/asn1/x509/AuthorityKeyIdentifier.cs index d5a9048cc..aca1dc330 100644 --- a/crypto/src/asn1/x509/AuthorityKeyIdentifier.cs +++ b/crypto/src/asn1/x509/AuthorityKeyIdentifier.cs @@ -184,23 +184,10 @@ namespace Org.BouncyCastle.Asn1.X509 public override Asn1Object ToAsn1Object() { Asn1EncodableVector v = new Asn1EncodableVector(); - - if (keyidentifier != null) - { - v.Add(new DerTaggedObject(false, 0, keyidentifier)); - } - - if (certissuer != null) - { - v.Add(new DerTaggedObject(false, 1, certissuer)); - } - - if (certserno != null) - { - v.Add(new DerTaggedObject(false, 2, certserno)); - } - - return new DerSequence(v); + v.AddOptionalTagged(false, 0, keyidentifier); + v.AddOptionalTagged(false, 1, certissuer); + v.AddOptionalTagged(false, 2, certserno); + return new DerSequence(v); } public override string ToString() |