Skip to content

NOTE jsrsasign 8.0.x to 9.0.0 Certificate and CSR API migration guide

Kenji Urushima edited this page Aug 18, 2020 · 16 revisions

major difference between 8.0.x and 9.0.0

Here are major changes between jsrsasign 8.0.x and 9.0.0:

  • make arguments for certificate extension constructors defined in KJUR.asn1.x509 consistent and changed
  • make certificate extension parsers defined in X509 class consistent and changed

This update misses backward compatibility in some certificate extension APIs.

benefits of 9.0.0 update

  • method names for all certificate extension parsers are "X509.getExt<>" like X509.getExtAuthorityInfoAccess. They are easy to remember
  • all result by certificate extension parsers are JSON objects and they can be passed to constructors for certificate extension like "new KJUR.asn1.x509.AuthorityInfoAccess({...})"

migration guide

  • When you codes don't use certificate extensions, you can update to 9.0.0.
  • When you codes use certificate extension APIs without backward compatibility, you need to modify your codes. Check the list below.

updated APIs without backward compatibility

  • return value format of X509.getExtAuthorityKeyIdentifier
  • return value format of X509.getExtSubjectKeyIdentifier
  • return value format of X509.getExtSubjectAltName
  • KJUR.asn1.x509.CertificatePolicies constructor parameter
  • KJUR.asn1.x509.AuthorityInfoAccess constructor parameter

updated APIs with backward compatibility

  • return value format of X509.getExtKeyUsageString (decipherOnly bugfix)
  • return value format of X509.getExtKeyUsageBin (decipherOnly bugfix)
  • return value format of X509.getBasicConstraints
  • KJUR.asn1.x509.BasicConstraints constructor parameter
  • KJUR.asn1.x509.DistributionPointName constructor parameter
  • KJUR.asn1.x509.DistributionPoint constructor parameter
  • KJUR.asn1.x509.CRLDistributionPoints constructor parameter

newly added APIs

  • X509.getExtKeyUsage
  • X509.getExtCertificatePolicies
  • X509.getExtCertificatePolicies
  • X509.getPolicyInformation
  • X509.getPolicyQualifierInfo
  • X509.getUserNotice
  • X509.getDisplayText
  • X509.getIssuerAltName
  • X509.getExtExtKeyUsage
  • X509.getExtCRLDistributionPoints
  • X509.getDistributionPoint
  • X509.getDistributionPointName
  • X509.getExtAuthorityInfoAccess

deprecated APIs

  • X509.getExtExtKeyUsageName
  • X509.getExtAIAInfo
  • X509.getExtSubjectAltName2
Clone this wiki locally