diff options
author | Ingela Anderton Andin <[email protected]> | 2017-10-06 17:15:52 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-11-09 17:14:01 +0100 |
commit | 48faad936ff6189daf9c0af7b39a86400057cb13 (patch) | |
tree | 08fc850ec115492ae9dd19120490060e06c58ec9 /lib/ssl | |
parent | 4147cfeb7c068cc65831d3fc249f6d4a83830a58 (diff) | |
download | otp-48faad936ff6189daf9c0af7b39a86400057cb13.tar.gz otp-48faad936ff6189daf9c0af7b39a86400057cb13.tar.bz2 otp-48faad936ff6189daf9c0af7b39a86400057cb13.zip |
public_key, ssl: Handles keys so that APIs are preserved correctly
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/test/x509_test.erl | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/ssl/test/x509_test.erl b/lib/ssl/test/x509_test.erl index 031fad1216..fea01efdaf 100644 --- a/lib/ssl/test/x509_test.erl +++ b/lib/ssl/test/x509_test.erl @@ -64,15 +64,12 @@ do_gen_pem_config_files(Config, CertFile, KeyFile, CAFile) -> cert_entry(Cert) -> {'Certificate', Cert, not_encrypted}. -key_entry(Key = #'RSAPrivateKey'{}) -> - Der = public_key:der_encode('RSAPrivateKey', Key), - {'RSAPrivateKey', Der, not_encrypted}; -key_entry(Key = #'DSAPrivateKey'{}) -> - Der = public_key:der_encode('DSAPrivateKey', Key), - {'DSAPrivateKey', Der, not_encrypted}; -key_entry(Key = #'ECPrivateKey'{}) -> - Der = public_key:der_encode('ECPrivateKey', Key), - {'ECPrivateKey', Der, not_encrypted}. +key_entry({'RSAPrivateKey', DERKey}) -> + {'RSAPrivateKey', DERKey, not_encrypted}; +key_entry({'DSAPrivateKey', DERKey}) -> + {'DSAPrivateKey', DERKey, not_encrypted}; +key_entry({'ECPrivateKey', DERKey}) -> + {'ECPrivateKey', DERKey, not_encrypted}. ca_entries(CAs) -> [{'Certificate', CACert, not_encrypted} || CACert <- CAs]. |