public class KeySupportTest extends Object
KeySupport.| 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 String |
ecPrivKeyPEMNoEncrypt
Location of non-encrypted, PEM formatted, EC private key.
|
private Logger |
log |
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 |
|---|
KeySupportTest() |
| Modifier and Type | Method and Description |
|---|---|
Object[][] |
decodeSecretKeyData() |
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 |
testDecodeECPrivateKeyPEMNoEncrypt()
Test decoding an EC 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 |
testDecodeSecretKey(Integer keyLengthBits,
String algorithm) |
void |
testDerivePublicKey()
Test deriving a public key from an RSA and DSA private key.
|
void |
testKeyLength() |
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.
|
private final Logger log
private String rsaPrivKeyPEMNoEncrypt
private String rsaPrivKeyDERNoEncrypt
private String dsaPrivKeyPEMNoEncrypt
private String dsaPrivKeyDERNoEncrypt
private char[] privKeyPassword
private String rsaPrivKeyPEMEncrypt
private String dsaPrivKeyPEMEncrypt
private String ecPrivKeyPEMNoEncrypt
public 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 testDecodeECPrivateKeyPEMNoEncrypt()
throws Exception
Exceptionpublic void testDerivePublicKey()
throws Exception
Exceptionpublic void testKeyPairMatching()
throws NoSuchAlgorithmException,
NoSuchProviderException,
org.opensaml.security.SecurityException
NoSuchProviderExceptionNoSuchAlgorithmExceptionorg.opensaml.security.SecurityExceptionpublic void testKeyLength()
throws NoSuchAlgorithmException,
NoSuchProviderException
public Object[][] decodeSecretKeyData()
public void testDecodeSecretKey(Integer keyLengthBits, String algorithm) throws NoSuchAlgorithmException, KeyException
NoSuchAlgorithmExceptionKeyExceptionprotected PrivateKey testPrivKey(String keyFile, char[] password, String algo) throws Exception
ExceptionCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.