Package se.litsec.opensaml.utils
Class X509CertificateUtils
- java.lang.Object
-
- se.litsec.opensaml.utils.X509CertificateUtils
-
public class X509CertificateUtils extends Object
Utilities for handling X.509 certificates.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static X509CertificatedecodeCertificate(File file)Given a file containing a X.509 certificate the method returns aX509Certificateobject.static X509CertificatedecodeCertificate(InputStream stream)Decodes aX509Certificatefrom an input stream.
-
-
-
Method Detail
-
decodeCertificate
public static X509Certificate decodeCertificate(File file) throws CertificateException, FileNotFoundException
Given a file containing a X.509 certificate the method returns aX509Certificateobject.- Parameters:
file- the file- Returns:
- a
X509Certificateobject - Throws:
CertificateException- for decoding errorsFileNotFoundException- if the file cannot be found
-
decodeCertificate
public static X509Certificate decodeCertificate(InputStream stream) throws CertificateException
Decodes aX509Certificatefrom an input stream.- Parameters:
stream- the stream to read- Returns:
- a
X509Certificateobject - Throws:
CertificateException- for decoding errors
-
-