aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/public_key_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-10-06 17:37:02 +0200
committerIngela Anderton Andin <[email protected]>2011-11-01 16:46:26 +0100
commitca4d1197fdf66fda5241edd645c12d2451b67ec8 (patch)
tree98ea5d5ab9fedc9a3a263750402c4d3d7464baf8 /lib/public_key/test/public_key_SUITE.erl
parentd5ebc4c1409284e0a343a64edf7d75308a1b3dd2 (diff)
downloadotp-ca4d1197fdf66fda5241edd645c12d2451b67ec8.tar.gz
otp-ca4d1197fdf66fda5241edd645c12d2451b67ec8.tar.bz2
otp-ca4d1197fdf66fda5241edd645c12d2451b67ec8.zip
Add PKCS-8 support to public_key
Diffstat (limited to 'lib/public_key/test/public_key_SUITE.erl')
-rw-r--r--lib/public_key/test/public_key_SUITE.erl48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index b11e4d092a..ddca0c9248 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -23,8 +23,8 @@
%% Note: This directive should only be used in test suites.
-compile(export_all).
--include_lib("common_test/include/ct.hrl").
--include_lib("test_server/include/test_server_line.hrl").
+%%-include_lib("common_test/include/ct.hrl").
+-include_lib("test_server/include/test_server.hrl").
-include_lib("public_key/include/public_key.hrl").
@@ -107,7 +107,7 @@ all() ->
{group, ssh_public_key_decode_encode},
encrypt_decrypt,
{group, sign_verify},
- pkix, pkix_path_validation, deprecated].
+ pkix, pkix_path_validation].
groups() ->
[{pem_decode_encode, [], [dsa_pem, rsa_pem, encrypted_pem,
@@ -215,19 +215,19 @@ encrypted_pem(Config) when is_list(Config) ->
Salt0 = crypto:rand_bytes(8),
Entry0 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey,
- {{"DES-EDE3-CBC", Salt0}, "1234abcd"}),
+ {{"DES-EDE3-CBC", {md5, Salt0}}, "1234abcd"}),
RSAKey = public_key:pem_entry_decode(Entry0,"1234abcd"),
Des3KeyFile = filename:join(Datadir, "des3_client_key.pem"),
erl_make_certs:der_to_pem(Des3KeyFile, [Entry0]),
- [{'RSAPrivateKey', _, {"DES-EDE3-CBC", Salt0}}] =
+ [{'RSAPrivateKey', _, {"DES-EDE3-CBC", {md5, Salt0}}}] =
erl_make_certs:pem_to_der(Des3KeyFile),
Salt1 = crypto:rand_bytes(8),
Entry1 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey,
- {{"DES-CBC", Salt1}, "4567efgh"}),
+ {{"DES-CBC", {md5, Salt1}}, "4567efgh"}),
DesKeyFile = filename:join(Datadir, "des_client_key.pem"),
erl_make_certs:der_to_pem(DesKeyFile, [Entry1]),
- [{'RSAPrivateKey', _, {"DES-CBC", Salt1}} =Entry2] =
+ [{'RSAPrivateKey', _, {"DES-CBC", {md5, Salt1}}} =Entry2] =
erl_make_certs:pem_to_der(DesKeyFile),
true = check_entry_type(public_key:pem_entry_decode(Entry2, "4567efgh"),
'RSAPrivateKey').
@@ -700,23 +700,23 @@ pkix_path_validation(Config) when is_list(Config) ->
ok.
%%--------------------------------------------------------------------
-deprecated(doc) ->
- ["Check deprecated functions."];
-deprecated(suite) ->
- [];
-deprecated(Config) when is_list(Config) ->
- Datadir = ?config(data_dir, Config),
- {ok, [DsaKey = {'DSAPrivateKey', _DsaKey, _}]} =
- public_key:pem_to_der(filename:join(Datadir, "dsa.pem")),
- {ok, [RsaKey = {'RSAPrivateKey', _RsaKey,_}]} =
- public_key:pem_to_der(filename:join(Datadir, "client_key.pem")),
- {ok, [ProtectedRsaKey = {'RSAPrivateKey', _ProtectedRsaKey,_}]} =
- public_key:pem_to_der(filename:join(Datadir, "rsa.pem")),
-
- {ok, #'DSAPrivateKey'{}} = public_key:decode_private_key(DsaKey),
- {ok, #'RSAPrivateKey'{}} = public_key:decode_private_key(RsaKey),
- {ok, #'RSAPrivateKey'{}} = public_key:decode_private_key(ProtectedRsaKey, "abcd1234"),
- ok.
+%% deprecated(doc) ->
+%% ["Check deprecated functions."];
+%% deprecated(suite) ->
+%% [];
+%% deprecated(Config) when is_list(Config) ->
+%% Datadir = ?config(data_dir, Config),
+%% {ok, [DsaKey = {'DSAPrivateKey', _DsaKey, _}]} =
+%% public_key:pem_to_der(filename:join(Datadir, "dsa.pem")),
+%% {ok, [RsaKey = {'RSAPrivateKey', _RsaKey,_}]} =
+%% public_key:pem_to_der(filename:join(Datadir, "client_key.pem")),
+%% {ok, [ProtectedRsaKey = {'RSAPrivateKey', _ProtectedRsaKey,_}]} =
+%% public_key:pem_to_der(filename:join(Datadir, "rsa.pem")),
+
+%% {ok, #'DSAPrivateKey'{}} = public_key:decode_private_key(DsaKey),
+%% {ok, #'RSAPrivateKey'{}} = public_key:decode_private_key(RsaKey),
+%% {ok, #'RSAPrivateKey'{}} = public_key:decode_private_key(ProtectedRsaKey, "abcd1234"),
+%% ok.
%%--------------------------------------------------------------------