Search code examples
certificatebouncycastlex509attributecertificate

Bouncy Castle AuthorityInfoAccess Extension


I'm trying to develop a X.509 Attribute Certificate generator with Bouncy Castle and I need to add an AuthorityInfoAccess extension. However, I can't find a non-deprecated way to do that!

The most-recent Bouncy Castle API Documentation doesn't show any clear way to build this extension and there is no example on their repository about that.

The answers I found about it refer to a X509Extensions.AuthorityInfoAccess, but it's deprecated!

Is there any trick about that?


Solution

  • The OIDs in X509Extensions were deprecated in favor of X509Extension but that was also deprecated in favor of org.bouncycastle.asn1.x509.Extension.authorityInfoAccess

    You don't say if you already have the content; if not, that uses org.bouncycastle.asn1.x509.AuthorityInformationAccess (note Information not just Info) which in turn uses similar AccessDescription and GeneralName