aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-08-24 08:57:57 +0200
committerIngela Anderton Andin <[email protected]>2010-08-24 08:57:57 +0200
commit574a68e84c92a8a44ea2e5d18a1cd2025892d496 (patch)
tree7ab50c40c457d500cdc2432ca3cc974d8f0959b1 /lib/ssl/test/ssl_test_lib.erl
parent7ed6bbd4e8bb88958bd45f85e3ef8af39c9f894f (diff)
parent12dfe961aeaf1a826d851361a24519e54d8ef119 (diff)
downloadotp-574a68e84c92a8a44ea2e5d18a1cd2025892d496.tar.gz
otp-574a68e84c92a8a44ea2e5d18a1cd2025892d496.tar.bz2
otp-574a68e84c92a8a44ea2e5d18a1cd2025892d496.zip
Merge branch 'ia/public_key_api/OTP-8722' into dev
* ia/public_key_api/OTP-8722: Revise the public_key API Resolved, version is now 0.8. Conflicts: lib/public_key/vsn.mk
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index e34b6782a6..c7ff015034 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -352,9 +352,9 @@ make_dsa_cert_files(RoleStr, Config) ->
KeyFile = filename:join([?config(priv_dir, Config),
RoleStr, "dsa_key.pem"]),
- public_key:der_to_pem(CaCertFile, [{cert, CaCert, not_encrypted}]),
- public_key:der_to_pem(CertFile, [{cert, Cert, not_encrypted}]),
- public_key:der_to_pem(KeyFile, [CertKey]),
+ der_to_pem(CaCertFile, [{'Certificate', CaCert, not_encrypted}]),
+ der_to_pem(CertFile, [{'Certificate', Cert, not_encrypted}]),
+ der_to_pem(KeyFile, [CertKey]),
{CaCertFile, CertFile, KeyFile}.
start_upgrade_server(Args) ->
@@ -615,3 +615,11 @@ openssl_dsa_suites() ->
true
end
end, Ciphers).
+
+pem_to_der(File) ->
+ {ok, PemBin} = file:read_file(File),
+ public_key:pem_decode(PemBin).
+
+der_to_pem(File, Entries) ->
+ PemBin = public_key:pem_encode(Entries),
+ file:write_file(File, PemBin).