Package io.jans.as.model.util
Class CertUtils
- java.lang.Object
-
- io.jans.as.model.util.CertUtils
-
public class CertUtils extends java.lang.Object
- Author:
- Yuriy Zabrovarnyy
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
confirmationMethodHashS256(java.lang.String certificateAsPem)
static boolean
equalsRdn(java.lang.String rdn1, java.lang.String rdn2)
static java.security.AlgorithmParameters
getAlgorithmParameters(java.security.cert.X509Certificate cert)
static @NotNull java.lang.String
getAttr(@Nullable java.security.cert.X509Certificate cert, org.bouncycastle.asn1.ASN1ObjectIdentifier attrName)
static @NotNull java.lang.String
getCN(@Nullable java.security.cert.X509Certificate cert)
static SignatureAlgorithm
getSignatureAlgorithm(java.security.cert.X509Certificate cert)
static java.security.cert.X509Certificate
x509CertificateFromBytes(byte[] cert)
static java.security.cert.X509Certificate
x509CertificateFromPem(java.lang.String pem)
-
-
-
Method Detail
-
getSignatureAlgorithm
public static SignatureAlgorithm getSignatureAlgorithm(java.security.cert.X509Certificate cert)
-
getAlgorithmParameters
public static java.security.AlgorithmParameters getAlgorithmParameters(java.security.cert.X509Certificate cert)
-
x509CertificateFromBytes
public static java.security.cert.X509Certificate x509CertificateFromBytes(byte[] cert)
-
x509CertificateFromPem
public static java.security.cert.X509Certificate x509CertificateFromPem(java.lang.String pem)
- Parameters:
pem
- (e.g. "-----BEGIN CERTIFICATE-----MIICsDCCAZigAwIBAgIIdF+Wcca7gzkwDQYJKoZIhvcNAQELBQAwGDEWMBQGA1UEAwwNY2FvajdicjRpcHc2dTAeFw0xNzA4MDcxNDMyMzVaFw0xODA4MDcxNDMyMzZaMBgxFjAUBgNVBAMMDWNhb2o3YnI0aXB3NnUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCdrt40Otrveq46K3BzZuds6wDqsP0kZV+C3GdyTQWl53orBRtPIiEh6BauP17Rr19qadh7t4yFBb5thrXwBewseSNEL4j7sB0YoeNwRsmA29Fjfoe0yeNpLixFadL6dz7ej9xW2suPppIO6jA5SYgL6+S42ZlIauCnSQBKFcdP8QRvgDZBZ4A7CmuloRJst7GQzppa+YWR+Zg3V5reV8Ekrkjxhwgd+rMsGahxijY7Juf2zMgLOXwe68y41SGnn+1RwezAhnJgioGiwY2gP7z2m8yNZXhpUiX+KAP2xvYb60wNYOswuqfpya68rSmYT8mQjld1EPR21dBMjRQ8HfUBAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAAIUlqltRlbqiolGETmAUF8AiC008UCUmI+IsnORbHFSaACKW04m1iFH0OlxuAE1ECj1mlTcKb4md6i7n+Fy+fdGXFL73yhlSiBLu7XW5uN1/dAkynA+mXC5BDFijmvkEAgNLKyh40u/U1u75v2SFS+kLyMeqmVxvUHA7qA8VgyHi/FZzXCfEvxK5jye4L8tkAR34x5j5MpPDMfLkwLegUG+ygX+h/f8luKiQAk7eD4C59c/F0PpigvzcMpyg8+SE9loIEuJ9dRaRaTwIzez3QA7PJtrhu9h0TooTtkmF/Zw9HARrO0qXgT8uNtQDcRXZCItt1Qr7cOJyx2IjTFR2rE=-----END CERTIFICATE-----";)- Returns:
- x509 certificate
-
confirmationMethodHashS256
public static java.lang.String confirmationMethodHashS256(java.lang.String certificateAsPem)
-
getCN
@NotNull public static @NotNull java.lang.String getCN(@Nullable @Nullable java.security.cert.X509Certificate cert)
-
getAttr
@NotNull public static @NotNull java.lang.String getAttr(@Nullable @Nullable java.security.cert.X509Certificate cert, org.bouncycastle.asn1.ASN1ObjectIdentifier attrName)
-
equalsRdn
public static boolean equalsRdn(java.lang.String rdn1, java.lang.String rdn2)
-
-