public class SecurityHelperTest
extends junit.framework.TestCase
SecurityHelper.| Modifier and Type | Field and Description |
|---|---|
private String |
dsaPrivKeyDERNoEncrypt
Location of non-encrypted, DER formatted, dSA private key.
|
private String |
dsaPrivKeyPEMEncrypt
Location of encrypted, PEM formatted, DSA private key.
|
private String |
dsaPrivKeyPEMNoEncrypt
Location of non-encrypted, PEM formatted, dSA private key.
|
private char[] |
privKeyPassword
Password for private key.
|
private String |
rsaPrivKeyDERNoEncrypt
Location of non-encrypted, DER formatted, RSA private key.
|
private String |
rsaPrivKeyPEMEncrypt
Location of encrypted, PEM formatted, RSA private key.
|
private String |
rsaPrivKeyPEMNoEncrypt
Location of non-encrypted, PEM formatted, RSA private key.
|
| Constructor and Description |
|---|
SecurityHelperTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp() |
void |
testDecodeDSAPrivateKeyDERNoEncrypt()
Test decoding an DSA private key, in DER format, without encryption.
|
void |
testDecodeDSAPrivateKeyPEMEncrypt()
Test decoding an DSA private key, in PEM format, with encryption.
|
void |
testDecodeDSAPrivateKeyPEMNoEncrypt()
Test decoding an DSA private key, in PEM format, without encryption.
|
void |
testDecodeRSAPrivateKeyDERNoEncrypt()
Test decoding an RSA private key, in DER format, without encryption.
|
void |
testDecodeRSAPrivateKeyPEMEncrypt()
Test decoding an RSA private key, in PEM format, with encryption.
|
void |
testDecodeRSAPrivateKeyPEMNoEncrypt()
Test decoding an RSA private key, in PEM format, without encryption.
|
void |
testDerivePublicKey()
Test deriving a public key from an RSA and DSA private key.
|
void |
testKeyAlgorithmURIMappings()
Test mapping algorithm URI's to JCA key algorithm specifiers.
|
void |
testKeyPairMatching()
Test the evaluation that 2 keys are members of the same key pair.
|
protected PrivateKey |
testPrivKey(String keyFile,
char[] password,
String algo)
Generic key testing.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toStringassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSameprivate String rsaPrivKeyPEMNoEncrypt
private String rsaPrivKeyDERNoEncrypt
private String dsaPrivKeyPEMNoEncrypt
private String dsaPrivKeyDERNoEncrypt
private char[] privKeyPassword
private String rsaPrivKeyPEMEncrypt
private String dsaPrivKeyPEMEncrypt
protected void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionpublic void testDecodeRSAPrivateKeyPEMNoEncrypt()
throws Exception
Exceptionpublic void testDecodeRSAPrivateKeyPEMEncrypt()
throws Exception
Exceptionpublic void testDecodeRSAPrivateKeyDERNoEncrypt()
throws Exception
Exceptionpublic void testDecodeDSAPrivateKeyPEMNoEncrypt()
throws Exception
Exceptionpublic void testDecodeDSAPrivateKeyPEMEncrypt()
throws Exception
Exceptionpublic void testDecodeDSAPrivateKeyDERNoEncrypt()
throws Exception
Exceptionpublic void testDerivePublicKey()
throws Exception
Exceptionpublic void testKeyAlgorithmURIMappings()
public void testKeyPairMatching()
throws NoSuchAlgorithmException,
NoSuchProviderException,
org.opensaml.xml.security.SecurityException
NoSuchProviderExceptionNoSuchAlgorithmExceptionSecurityExceptionorg.opensaml.xml.security.SecurityExceptionprotected PrivateKey testPrivKey(String keyFile, char[] password, String algo) throws Exception
ExceptionCopyright © 1999-2014. All Rights Reserved.