diff options
author | Björn Gustavsson <[email protected]> | 2012-11-14 10:15:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-11-23 11:43:02 +0100 |
commit | 6ef8cbdaaaa1c30a7dc4620635726f62084dbd22 (patch) | |
tree | e9534d443f11f2521cc1de312f2e00ff4e471d97 /lib/asn1/test/testSSLspecs.erl | |
parent | 4a80c771f6a4e04fd4e7f7990e9d9a118ab2d689 (diff) | |
download | otp-6ef8cbdaaaa1c30a7dc4620635726f62084dbd22.tar.gz otp-6ef8cbdaaaa1c30a7dc4620635726f62084dbd22.tar.bz2 otp-6ef8cbdaaaa1c30a7dc4620635726f62084dbd22.zip |
Remove obsolete back-ends and simplify the options
It is time to clean up the mess of back-ends.
Remove all the obsolete back-ends and simplify the options used
to select them.
New Option Old Equivalent
---------- --------------
ber ber_bin,optimize,nif
per per,optimize,nif
uper uper_bin
The old options will still be recognized and translated to the
new options, but will also print a warning.
That implies that deprecated features that only are implemented
in the old 'ber' back-end will no longer work (e.g. the
{Typename,Value} notation).
Also make the return type for the generated encode/2 function
consistent. It used to be a binary for per and uper, and an iolist
for ber. Always make it a binary.
Diffstat (limited to 'lib/asn1/test/testSSLspecs.erl')
-rw-r--r-- | lib/asn1/test/testSSLspecs.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/asn1/test/testSSLspecs.erl b/lib/asn1/test/testSSLspecs.erl index 51ef134e5f..45c5da50f0 100644 --- a/lib/asn1/test/testSSLspecs.erl +++ b/lib/asn1/test/testSSLspecs.erl @@ -42,11 +42,11 @@ compile(Config, Options) -> asn1_test_lib:compile_all(["PKIX1Explicit93", "PKIX1Implicit93"], Config, NewOptions). -compile_inline(Config, Rule) when Rule == ber_bin; Rule == ber_bin_v2 -> +compile_inline(Config, ber=Rule) -> DataDir = ?config(data_dir, Config), CaseDir = ?config(case_dir, Config), Options = [{i, CaseDir}, {i, DataDir}, Rule, - der, compact_bit_string, optimize, asn1config, inline], + der, compact_bit_string, asn1config, inline], ok = remove_db_file_inline(CaseDir), asn1_test_lib:compile("OTP-PKIX.set.asn", Config, Options); compile_inline(_Config, _Rule) -> @@ -73,7 +73,7 @@ remove_db_file_inline(Dir) -> ?line ok = remove_db_file(Dir ++ "PKIX1Explicit88.asn1db"), ?line ok = remove_db_file(Dir ++ "PKIX1Implicit88.asn1db"). -run(BER) when BER==ber_bin;BER==ber_bin_v2 -> +run(ber) -> run1(1); run(_) -> ok. @@ -100,20 +100,20 @@ transform1(ATAV) -> ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', ATAV), ?line {ok, _ATAVDec} = 'SSL-PKIX':decode('AttributeTypeAndValue', - list_to_binary(ATAVEnc)). + ATAVEnc). transform2(ATAV) -> ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('AttributeTypeAndValue', ATAV), ?line {ok, _ATAVDec} = 'PKIX1Explicit88':decode('AttributeTypeAndValue', - list_to_binary(ATAVEnc)). + ATAVEnc). transform4(ATAV) -> ?line {ok, ATAVEnc} = 'PKIX1Explicit88':encode('Attribute', ATAV), ?line {ok, _ATAVDec} = 'PKIX1Explicit88':decode('Attribute', - list_to_binary(ATAVEnc)). + ATAVEnc). ex(1) -> @@ -146,7 +146,7 @@ ex(7) -> {1,2,840,113549,1,9,1}, [[19,5,111,116,112,67,65]]}. -run_inline(Rule) when Rule==ber_bin;Rule==ber_bin_v2 -> +run_inline(ber) -> Cert = cert(), ?line {ok,{'CertificatePKIX1Explicit88',{Type,UnDec},_,_}} = 'OTP-PKIX':decode_TBSCert_exclusive(Cert), ?line {ok,_} = 'OTP-PKIX':decode_part(Type,UnDec), |