Class CertificateParser

Object
com.zebra.sdk.certificate.CertificateParser

public class CertificateParser extends Object
Takes in a certificate file (P12, DER, PEM, etc) and processes it into a ZebraCertificateInfo object which contains the selected certificate, Certificate Authority certificate chain, and private key (if applicable).
  • Method Details

    • parseCertificate

      public static ZebraCertificateInfo parseCertificate(InputStream certificateStream, String alias, String password) throws IOException, ZebraCertificateException, CertificateEncodingException, KeyStoreException
      Takes in a certificate file (P12, DER, PEM, etc) and processes it into a ZebraCertificateInfo object which contains the selected certificate, Certificate Authority certificate chain, and private key (if applicable).
      Parameters:
      certificateStream - data stream for the certificate file to be processed
      alias - the certificate to use within a multi-certificate (like PKCS12) file
      password - used to unlock a protected certificate file
      Returns:
      ZebraCertificateInfo contains all certificate and key information for the processed file
      Throws:
      IOException - thrown if there is an issue reading the certificate file
      ZebraCertificateException - thrown if there is an issue processing the certificate file
      CertificateEncodingException - thrown if the certificate type can not be determined.
      KeyStoreException - thrown if a PKCS12 file can not be processed due to invalid alias or password selection