diff options
author | Fredrik Gustafsson <fredrik@erlang.org> | 2012-11-13 16:19:18 +0100 |
---|---|---|
committer | Ingela Anderton Andin <ingela@erlang.org> | 2012-11-15 14:02:00 +0100 |
commit | 689b6c5bacf0d7f89c7f3de028627753ad5a1438 (patch) | |
tree | b2d639311e8a1036340fab2dc9a3fdd747fb07ce /lib/public_key/test | |
parent | 067aef311309ad751ddeb9c40169b25c0dd1b72c (diff) | |
download | otp-689b6c5bacf0d7f89c7f3de028627753ad5a1438.tar.gz otp-689b6c5bacf0d7f89c7f3de028627753ad5a1438.tar.bz2 otp-689b6c5bacf0d7f89c7f3de028627753ad5a1438.zip |
public_key: Added PKCS-10
Diffstat (limited to 'lib/public_key/test')
-rw-r--r-- | lib/public_key/test/public_key_SUITE.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl index 6a879867e1..eeecdb7d8f 100644 --- a/lib/public_key/test/public_key_SUITE.erl +++ b/lib/public_key/test/public_key_SUITE.erl @@ -249,6 +249,21 @@ dh_pem(Config) when is_list(Config) -> DHParameter = public_key:pem_entry_decode(Entry), Entry = public_key:pem_entry_encode('DHParameter', DHParameter). + +%%-------------------------------------------------------------------- + +pkcs10_pem(doc) -> + [""]; +pkcs10_pem(suite) -> + []; +pkcs10_pem(Config) when is_list(Config) -> + Datadir = ?config(data_dir, Config), + [{'CertificationRequest', DerPKCS10, not_encrypted} = Entry] = + erl_make_certs:pem_to_der(filename:join(Datadir, "req.pem")), + + erl_make_certs:der_to_pem(filename:join(Datadir, "new_req.pem"), [Entry]), + + public_key:der_decode('CertificationRequest', DerPKCS10). %%-------------------------------------------------------------------- cert_pem(doc) -> |