diff options
Diffstat (limited to 'crypto/src/asn1/x509/RoleSyntax.cs')
-rw-r--r-- | crypto/src/asn1/x509/RoleSyntax.cs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/crypto/src/asn1/x509/RoleSyntax.cs b/crypto/src/asn1/x509/RoleSyntax.cs index 48c3c6cae..b5b217b6b 100644 --- a/crypto/src/asn1/x509/RoleSyntax.cs +++ b/crypto/src/asn1/x509/RoleSyntax.cs @@ -190,19 +190,13 @@ namespace Org.BouncyCastle.Asn1.X509 * } * </pre> */ - public override Asn1Object ToAsn1Object() - { - Asn1EncodableVector v = new Asn1EncodableVector(); - - if (this.roleAuthority != null) - { - v.Add(new DerTaggedObject(false, 0, roleAuthority)); - } - - v.Add(new DerTaggedObject(true, 1, roleName)); - - return new DerSequence(v); - } + public override Asn1Object ToAsn1Object() + { + Asn1EncodableVector v = new Asn1EncodableVector(); + v.AddOptionalTagged(false, 0, roleAuthority); + v.Add(new DerTaggedObject(true, 1, roleName)); + return new DerSequence(v); + } public override string ToString() { |