Package com.zebra.sdk.certificate
Class CertificateParser
Object
com.zebra.sdk.certificate.CertificateParser
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 Summary
Modifier and TypeMethodDescriptionstatic ZebraCertificateInfoparseCertificate(InputStream certificateStream, String alias, String password) 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 processedalias- the certificate to use within a multi-certificate (like PKCS12) filepassword- 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 fileZebraCertificateException- thrown if there is an issue processing the certificate fileCertificateEncodingException- 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
-