aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/public_key_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-11-15 16:28:32 +0100
committerIngela Anderton Andin <[email protected]>2012-11-16 10:03:05 +0100
commit7a9b5514b88923ae342a2bf140a534244791a6ff (patch)
tree076bd5aa49fc08731563bf278f22bfe762d9429d /lib/public_key/test/public_key_SUITE.erl
parentdbf18b8a7713d76c0be307af40e97cd7c564aa53 (diff)
downloadotp-7a9b5514b88923ae342a2bf140a534244791a6ff.tar.gz
otp-7a9b5514b88923ae342a2bf140a534244791a6ff.tar.bz2
otp-7a9b5514b88923ae342a2bf140a534244791a6ff.zip
public_key: Add PKCS-10 documentation and PKCS-7 test case
Note that PKCS-7 is an undocumented feature for now. Also added some minor enhancements to the documentation.
Diffstat (limited to 'lib/public_key/test/public_key_SUITE.erl')
-rw-r--r--lib/public_key/test/public_key_SUITE.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index 8dfd068d91..1db3b9df90 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -268,7 +268,23 @@ pkcs10_pem(Config) when is_list(Config) ->
Entry = public_key:pem_entry_encode('CertificationRequest', PKCS10).
-
+%%--------------------------------------------------------------------
+pkcs7_pem(doc) ->
+ [""];
+pkcs7_pem(suite) ->
+ [];
+pkcs7_pem(Config) when is_list(Config) ->
+ Datadir = ?config(data_dir, Config),
+ [{'ContentInfo', DerPKCS7, not_encrypted} = Entry] =
+ erl_make_certs:pem_to_der(filename:join(Datadir, "pkcs7_cert.pem")),
+
+ erl_make_certs:der_to_pem(filename:join(Datadir, "new_pkcs7_cert.pem"), [Entry]),
+
+ PKCS7 = public_key:der_decode('ContentInfo', DerPKCS7),
+ PKCS7 = public_key:pem_entry_decode(Entry),
+
+ Entry = public_key:pem_entry_encode('ContentInfo', PKCS7).
+
%%--------------------------------------------------------------------
cert_pem(doc) ->
[""];