Class X509Certificate

java.lang.Object
com.sap.cloud.security.x509.X509Certificate
All Implemented Interfaces:
Certificate

public class X509Certificate extends Object implements Certificate
The X.509 certificate
  • Method Details

    • newCertificate

      @Nullable public static X509Certificate newCertificate(String pemOrXfcc)
      Creates a new instance of X.509 certificate.
      Parameters:
      pemOrXfcc - either the certificate encoded as PEM (or plain base64) or the complete content of the XFCC header
      Returns:
      instance of X509certificate
    • newCertificateFromPEM

      @Nullable public static X509Certificate newCertificateFromPEM(String pem)
      Creates a new instance of X.509 certificate.
      Parameters:
      pem - the certificate encoded in base64 or PEM format
      Returns:
      instance of X509certificate
    • newCertificateFromXFCC

      @Nullable public static X509Certificate newCertificateFromXFCC(String headerValue)
      Creates a new instance of X.509 certificate.
      Parameters:
      headerValue - the content of the XFCC header
      Returns:
      instance of X509certificate
    • getThumbprint

      public String getThumbprint() throws InvalidCertificateException
      Specified by:
      getThumbprint in interface Certificate
      Throws:
      InvalidCertificateException
    • getSubjectDN

      public String getSubjectDN()
      Specified by:
      getSubjectDN in interface Certificate
    • getSubjectDNMap

      public Map<String,String> getSubjectDNMap()
      Specified by:
      getSubjectDNMap in interface Certificate
    • getPEM

      public String getPEM()
      Returns:
      a base64 encoded DER certificate or certificate in PEM format