| Package | Description |
|---|---|
| es.gob.afirma.tsl.utils |
Package that defines the utilities classes.
|
| Modifier and Type | Method and Description |
|---|---|
static java.security.cert.X509CRL |
UtilsCRL.buildX509CRLfromByteArray(byte[] crlByteArray)
Builds a X.509 CRL from the input byte array.
|
static java.security.cert.X509CRL |
UtilsCRL.buildX509CRLfromByteArray(java.io.InputStream isCRL)
Builds a X.509 CRL from the input stream.
|
static byte[] |
UtilsCrypto.calculateDigest(java.lang.String algorithm,
byte[] data,
java.security.Provider provider)
Calculate the digest of the input data with the algorithm specified.
|
static byte[] |
UtilsCrypto.calculateDigestReturnB64ByteArray(java.lang.String algorithm,
byte[] data,
java.security.Provider provider)
Calculate the digest in base 64 of the input data with the algorithm specified.
|
static java.lang.String |
UtilsCrypto.calculateDigestReturnB64String(java.lang.String algorithm,
byte[] data,
java.security.Provider provider)
Calculate the digest in base 64 of the input data with the algorithm specified.
|
static boolean |
UtilsCertificateTsl.equals(java.security.cert.X509Certificate cert1,
java.security.cert.X509Certificate cert2)
Method that indicates whether some other certificate is "equal to" this one (
true) or not (false). |
static org.bouncycastle.asn1.x509.Certificate |
UtilsCertificateTsl.getBouncyCastleCertificate(byte[] certificate)
Creates a BouncyCastle X509Certificate given its content.
|
static org.bouncycastle.asn1.x509.Certificate |
UtilsCertificateTsl.getBouncyCastleCertificate(java.security.cert.Certificate x509cert)
Creates a BouncyCastle X509Certificate from a java X509Certificate.
|
static java.lang.String |
UtilsCertificateTsl.getCertificateId(java.security.cert.X509Certificate cert)
Gets certificate´s identifier (canonicalized subject).
|
static java.lang.String |
UtilsCertificateTsl.getCertificateIssuerId(java.security.cert.X509Certificate cert)
Method that obtains the canonicalized identifier of the issuer of a certificate.
|
static java.security.cert.X509CRL |
UtilsLDAP.getCRLfromLDAP(java.lang.String urlServer,
java.lang.String user,
java.lang.String password,
java.lang.String pathLDAP,
java.lang.String searchFilter,
java.lang.String[] attributes,
int connectionTimeout,
int readTimeout,
boolean directLDAP)
Method that obtains the CRL from the LDAP.
|
static byte[] |
UtilsHTTP.getDataFromURI(java.lang.String path,
int connectionTimeout,
int readTimeout)
Method that allows download the data from a URI using the
HttpClient library. |
static byte[] |
UtilsHTTP.getDataFromURI(java.lang.String uriString,
int connectionTimeout,
int readTimeout,
java.lang.String user,
java.lang.String password,
java.util.Map<java.lang.String,java.lang.String> headersMap)
Method that allows download the data from a URI using the
HttpClient library. |
static byte[] |
UtilsHTTP.getResponseByHttpPostWithEntity(java.lang.String uriString,
int connectionTimeout,
int readTimeout,
byte[] inputData,
java.lang.String inputContentType,
java.lang.String outputContentType,
java.lang.String user,
java.lang.String password)
Method that makes a HTTP POST request to certain URL and obtains the response as a bytes array.
|
static java.security.cert.X509Certificate |
UtilsCertificateTsl.getX509Certificate(byte[] certificate)
Creates a X509Certificate given its content.
|
static boolean |
UtilsCertificateTsl.hasCertKeyPurposeTimeStamping(java.security.cert.X509Certificate cert)
Checks if the input certificate has the key purpose for TimeStamping.
|
static java.lang.String |
UtilsASN1.toString(javax.security.auth.x500.X500Principal name)
Method that obtains the content of a
X500Principal object on string format. |
static java.lang.String |
UtilsCrypto.translateHashAlgorithmXML(java.lang.String algorithmURI)
Method that obtains the name of certain algorithm from the URI of the algorithm (only for XML format).
|
static boolean |
UtilsCertificateTsl.verify(java.security.PublicKey publicKey,
java.security.cert.X509Certificate cert)
Checks if a given public key corresponds to the private key that signed the input certificate.
|
static boolean |
UtilsCertificateTsl.verify(java.security.cert.X509Certificate certIssuer,
java.security.cert.X509Certificate cert)
Checks if a given certificate is issued by another one.
|