public class X509SupportTest extends Object
| Constructor and Description |
|---|
X509SupportTest() |
| Modifier and Type | Method and Description |
|---|---|
private List |
getAltNames(X509Certificate cert,
Set<Integer> nameTypes)
Get the alt names from the certificate.
|
protected void |
setUp() |
void |
testDecodeCertDER()
Test decoding a DER encoded cert.
|
void |
testDecodeCertPEM()
Test decoding a PEM encoded cert.
|
void |
testDecodeCRLDER()
Test decoding a DER encoded CRL.
|
void |
testDecodeCRLPEM()
Test decoding a PEM encoded CRL.
|
void |
testDetermineEntityCertificate()
Tests that the entity cert is correctly identified in the collection.
|
void |
testEC()
Test decoding and matching EC keypair.
|
void |
testGetCommonNames()
Test common name (CN) extraction from X500Principal.
|
void |
testGetSubjectAltNames1NameDNS()
Test 1 alt name: DNS.
|
void |
testGetSubjectAltNames1NameIP()
Test 1 alt name: IP.
|
void |
testGetSubjectAltNames1NameURL()
Test 1 alt name: URI (URL).
|
void |
testGetSubjectAltNames1NameURN()
Test 1 alt name: URI (URN).
|
void |
testGetSubjectAltNames3NamesDNS_URL_IP()
Test 3 alt names: DNS, URI (URL), IP.
|
void |
testGetSubjectAltNames3NamesDNS_URN_IP()
Test 3 alt names: DNS, URI (URN), IP.
|
void |
testGetSubjectKeyIdentifier()
Test Subject Key Identifier (SKI) extraction from certificate.
|
private PrivateKey entityPrivateKey
private String entityPrivKeyBase64
private X509Certificate entityCert
private String entityCertBase64
private X509Certificate entityCert3AltNamesDNS_URL_IP
private String entityCert3AltNamesDNS_URL_IPBase64
private X509Certificate entityCert3AltNamesDNS_URN_IP
private String entityCert3AltNamesDNS_URN_IPBase64
private X509Certificate entityCert1AltNameDNS
private String entityCert1AltNameDNSBase64
private X509Certificate entityCert1AltNameURN
private String entityCert1AltNameURNBase64
private X509Certificate entityCert1AltNameURL
private String entityCert1AltNameURLBase64
private X509Certificate entityCert1AltNameIP
private String entityCert1AltNameIPBase64
private String altNameDNS
private String altNameURN
private String altNameURL
private String altNameIP
private Integer altNameTypeDNS
private Integer altNameTypeURI
private Integer altNameTypeIP
private static String subjectAltNameExtensionOID
private String certPEM
private String certDER
private String crlPEM
private String crlDER
private String certEC
private String keyEC
public void testGetCommonNames()
public void testGetSubjectKeyIdentifier()
throws org.apache.commons.codec.DecoderException
org.apache.commons.codec.DecoderExceptionpublic void testDetermineEntityCertificate()
throws Exception
Exceptionpublic void testGetSubjectAltNames1NameDNS()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testGetSubjectAltNames1NameURN()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testGetSubjectAltNames1NameURL()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testGetSubjectAltNames1NameIP()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testGetSubjectAltNames3NamesDNS_URL_IP()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testGetSubjectAltNames3NamesDNS_URN_IP()
throws org.opensaml.security.SecurityException,
CertificateParsingException
org.opensaml.security.SecurityExceptionCertificateParsingExceptionpublic void testDecodeCertPEM()
throws Exception
Exceptionpublic void testDecodeCertDER()
throws Exception
Exceptionpublic void testDecodeCRLPEM()
throws Exception
Exceptionpublic void testDecodeCRLDER()
throws Exception
Exceptionpublic void testEC()
throws Exception
Exceptionprivate List getAltNames(X509Certificate cert, Set<Integer> nameTypes)
cert - the cert to processnameTypes - set of Integers identifying which alt name types to extractCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.