Package org.opensaml.xmlsec.keyinfo.impl
Class X509KeyInfoGeneratorTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.keyinfo.impl.X509KeyInfoGeneratorTest
public class X509KeyInfoGeneratorTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
Tests the factory and impl for X509KeyInfoGenerator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Integerprivate Stringprivate Integerprivate Stringprivate Integerprivate X509Certificateprivate Stringprivate X509CRLprivate Stringprivate BasicX509Credentialprivate X509Certificateprivate Stringprivate Stringprivate Stringprivate Stringprivate X509KeyInfoGeneratorFactoryprivate KeyInfoGeneratorprivate X500Principalprivate Stringprivate Stringprivate PublicKeyprivate BigIntegerprivate static Stringprivate Stringprivate byte[]private X500Principalprivate byte[]Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[][]protected voidsetUp()voidTest combo options of cert and chain - don't emit duplicate of entity cert.voidTest emit CRLs.voidTest emit entity cert.voidTest emit entity cert chain in X509Data.voidTest emit entity ID as key name.voidTest emit credential key names.voidTest emitting combinations of key names.voidTest emit public key.voidTest emit subject alt names as key names.voidTest emit subject CN as key name.voidTest emit subject DN as key name.voidTest emit X509Digest in X509Data.voidTest emit issuer name and serial number in X509Data.voidTest emit subject key identifier in X509Data.voidTest emit subject name in X509Data.voidtestKeyInfoElementType(Class<? extends KeyInfo> type) Test emit of sub-type of KeyInfo.voidTest no options - should produce null KeyInfo.voidTest that the options passed to the generator are really cloned.Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
subjectAltNameExtensionOID
-
credential
-
factory
-
generator
-
keyNameFoo
-
keyNameBar
-
entityID
-
pubKey
-
entityCert
-
entityCertBase64
-
entityCertSKIBase64
-
entityCertDigestBase64
-
caCert
-
caCertBase64
-
subjectCN
-
subjectName
-
issuerName
-
serialNumber
-
subjectKeyIdentifier
private byte[] subjectKeyIdentifier -
x509Digest
private byte[] x509Digest -
altName1
-
altName2
-
altName3
-
altName1Type
-
altName2Type
-
altName3Type
-
caCRL
-
caCRLBase64
-
-
Constructor Details
-
X509KeyInfoGeneratorTest
public X509KeyInfoGeneratorTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testNoOptions
Test no options - should produce null KeyInfo.- Throws:
SecurityException- ...
-
testEmitPublicKey
Test emit public key.- Throws:
SecurityException- ...KeyException- ...
-
testEmitKeynames
Test emit credential key names.- Throws:
SecurityException- ...
-
testEmitEntityIDAsKeyName
Test emit entity ID as key name.- Throws:
SecurityException- ...
-
testEmitEntityCert
Test emit entity cert.- Throws:
SecurityException- ...CertificateException- ...
-
testEmitEntityCertChain
Test emit entity cert chain in X509Data.- Throws:
SecurityException- ...CertificateException- ...
-
testEmitCertAndChainCombo
Test combo options of cert and chain - don't emit duplicate of entity cert.- Throws:
SecurityException- ...CertificateException- ...
-
testEmitCRLs
Test emit CRLs.- Throws:
SecurityException- ...CRLException- ...
-
testEmitX509SubjectName
Test emit subject name in X509Data.- Throws:
SecurityException- ...
-
testEmitX509IssuerSerial
Test emit issuer name and serial number in X509Data.- Throws:
SecurityException- ...
-
testEmitX509SKI
Test emit subject key identifier in X509Data.- Throws:
SecurityException- ...DecodingException- if the base64 key identifier can not be decoded.
-
testEmitX509Digest
Test emit X509Digest in X509Data.- Throws:
SecurityException- ...DecodingException- if the base64 digest value can not be decoded.
-
testEmitSubjectDNAsKeyName
Test emit subject DN as key name.- Throws:
SecurityException- ...
-
testEmitSubjectCNAsKeyName
Test emit subject CN as key name.- Throws:
SecurityException- ...
-
testEmitSubjectAltNamesAsKeyNames
public void testEmitSubjectAltNamesAsKeyNames() throws SecurityException, CertificateParsingExceptionTest emit subject alt names as key names.- Throws:
SecurityException- ...CertificateParsingException- ...
-
testEmitKeyNamesCombo
Test emitting combinations of key names.- Throws:
SecurityException- ...
-
testProperOptionsCloning
Test that the options passed to the generator are really cloned. After newInstance() is called, changes to the factory options should not be reflected in the generator.- Throws:
SecurityException- ...
-
keyInfoTypes
-
testKeyInfoElementType
public void testKeyInfoElementType(Class<? extends KeyInfo> type) throws SecurityException, CertificateException Test emit of sub-type of KeyInfo.- Throws:
SecurityException- ...CertificateException- ...
-