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 PrivateKey
getPrivateKey
(InputStream inputStream) Generates aPrivateKey
from 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
- aFile
containing the cert data- Throws:
CertificateException
IOException
-
toX509Certificates
public static X509Certificate[] toX509Certificates(InputStream inputStream) throws CertificateException, IOException Generates X509Certificate array from theInputStream
.- Throws:
CertificateException
IOException
-
getPrivateKey
Generates aPrivateKey
from theInputStream
.- Throws:
Exception
-