diff options
author | Björn Gustavsson <[email protected]> | 2013-02-07 12:20:09 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-02-07 12:23:36 +0100 |
commit | d45c6b727da8db7664d2cc08a16ef8ca68fe46df (patch) | |
tree | 9c54e0860b805d379c4b770428b8a6ac2a603d9e /lib/asn1/test/test_modified_x420.erl | |
parent | 258c6a4b0e393d6112c738ae0c4d4b7f699d5e47 (diff) | |
parent | c310adbff67aa89f1ad3bff7c0a03c3506fe85ee (diff) | |
download | otp-d45c6b727da8db7664d2cc08a16ef8ca68fe46df.tar.gz otp-d45c6b727da8db7664d2cc08a16ef8ca68fe46df.tar.bz2 otp-d45c6b727da8db7664d2cc08a16ef8ca68fe46df.zip |
Merge branch 'maint-r15' into maint
* maint-r15:
Prepare release
Don't run testX420/1 on old slow Sparc systems
testX420: Pass Options to the ASN.1 compiler
asn1_erl_nif: Correct broken length encoding
asn1_SUITE: Mend broken test_modified_x420/1
Fix a bug for multiple extension addition groups
Diffstat (limited to 'lib/asn1/test/test_modified_x420.erl')
-rw-r--r-- | lib/asn1/test/test_modified_x420.erl | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/asn1/test/test_modified_x420.erl b/lib/asn1/test/test_modified_x420.erl index 2e9dfeee87..ae9d1989fb 100644 --- a/lib/asn1/test/test_modified_x420.erl +++ b/lib/asn1/test/test_modified_x420.erl @@ -18,27 +18,21 @@ %% %% -module(test_modified_x420). - -%-compile(export_all). --export([test_io/1]). +-export([test/1]). -include_lib("test_server/include/test_server.hrl"). -test_io(Config) -> - io:format("~p~n~n", [catch test(Config)]). - test(Config) -> - ?line DataDir = ?config(data_dir,Config), -% ?line OutDir = ?config(priv_dir,Config), + DataDir = ?config(data_dir,Config), - ?line Der = read_pem(filename:join([DataDir,modified_x420,"p7_signed_data.pem"])), - ?line {ok, {_,_,SignedData}} = 'PKCS7':decode('ContentInfo', Der), - ?line {ok,_} = 'PKCS7':decode('SignedData', SignedData). + Der = read_pem(filename:join([DataDir,modified_x420,"p7_signed_data.pem"])), + {ok,{_,_,SignedData}} = asn1_wrapper:decode('PKCS7', 'ContentInfo', Der), + {ok,_} = asn1_wrapper:decode('PKCS7', 'SignedData', SignedData). read_pem(File) -> - ?line {ok, Bin} = file:read_file(File), - ?line ssl_base64:join_decode(lists:flatten(extract_base64(Bin))). - + {ok,Bin} = file:read_file(File), + Der = base64:mime_decode(lists:flatten(extract_base64(Bin))), + binary_to_list(Der). extract_base64(Binary) -> |