Class CertificateUtils
java.lang.Object
io.grpc.xds.internal.security.trust.CertificateUtils
Contains certificate utility method(s).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PrivateKeygetPrivateKey(InputStream inputStream) Generates aPrivateKeyfrom theInputStream.(package private) static X509Certificate[]toX509Certificates(File file) Generates X509Certificate array from a file on disk.static X509Certificate[]toX509Certificates(InputStream inputStream) Generates X509Certificate array from theInputStream.
-
Constructor Details
-
CertificateUtils
private CertificateUtils()
-
-
Method Details
-
toX509Certificates
Generates X509Certificate array from a file on disk.- Parameters:
file- aFilecontaining the cert data- Throws:
CertificateExceptionIOException
-
toX509Certificates
public static X509Certificate[] toX509Certificates(InputStream inputStream) throws CertificateException, IOException Generates X509Certificate array from theInputStream.- Throws:
CertificateExceptionIOException
-
getPrivateKey
Generates aPrivateKeyfrom theInputStream.- Throws:
Exception
-