org.opensaml.xml.security
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 |
---|---|
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.
|
assertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
private String rsaPrivKeyPEMNoEncrypt
private String rsaPrivKeyDERNoEncrypt
private String dsaPrivKeyPEMNoEncrypt
private String dsaPrivKeyDERNoEncrypt
private char[] privKeyPassword
private String rsaPrivKeyPEMEncrypt
private String dsaPrivKeyPEMEncrypt
public void testDecodeRSAPrivateKeyPEMNoEncrypt() throws Exception
Exception
public void testDecodeRSAPrivateKeyPEMEncrypt() throws Exception
Exception
public void testDecodeRSAPrivateKeyDERNoEncrypt() throws Exception
Exception
public void testDecodeDSAPrivateKeyPEMNoEncrypt() throws Exception
Exception
public void testDecodeDSAPrivateKeyPEMEncrypt() throws Exception
Exception
public void testDecodeDSAPrivateKeyDERNoEncrypt() throws Exception
Exception
public void testDerivePublicKey() throws Exception
Exception
public void testKeyAlgorithmURIMappings()
public void testKeyPairMatching() throws NoSuchAlgorithmException, NoSuchProviderException, org.opensaml.xml.security.SecurityException
NoSuchProviderException
NoSuchAlgorithmException
SecurityException
org.opensaml.xml.security.SecurityException
protected PrivateKey testPrivKey(String keyFile, char[] password, String algo) throws Exception
Exception
Copyright © 1999-2014 JBoss by Red Hat. All Rights Reserved.