From 8ddc7bf875afb089daedf61e922b691d7c73792d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 22 Nov 2012 17:24:09 +0100 Subject: Fix other applications --- lib/public_key/asn1/Makefile | 2 +- lib/public_key/src/pubkey_cert_records.erl | 6 +++--- lib/public_key/test/erl_make_certs.erl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/public_key') diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile index 957c332cad..763b788e53 100644 --- a/lib/public_key/asn1/Makefile +++ b/lib/public_key/asn1/Makefile @@ -66,7 +66,7 @@ EBIN = ../ebin EXTRA_ERLC_FLAGS = ERL_COMPILE_FLAGS += $(EXTRA_ERLC_FLAGS) -ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj +asn1config +inline +nif +ASN_FLAGS = -bber +der +compact_bit_string +noobj +asn1config +inline # ---------------------------------------------------- # Targets diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl index 33fe940ea2..98004c71a3 100644 --- a/lib/public_key/src/pubkey_cert_records.erl +++ b/lib/public_key/src/pubkey_cert_records.erl @@ -119,7 +119,7 @@ encode_supportedPublicKey(#'OTPSubjectPublicKeyInfo'{algorithm= PA = subjectPublicKey = SPK0}) -> Type = supportedPublicKeyAlgorithms(Algo), {ok, SPK} = 'OTP-PUB-KEY':encode(Type, SPK0), - #'OTPSubjectPublicKeyInfo'{subjectPublicKey = {0,list_to_binary(SPK)}, algorithm=PA}. + #'OTPSubjectPublicKeyInfo'{subjectPublicKey = {0,SPK}, algorithm=PA}. %%% Extensions @@ -161,7 +161,7 @@ decode_extensions(Exts) -> case extension_id(Id) of undefined -> Ext; Type -> - {ok, Value} = 'OTP-PUB-KEY':decode(Type, list_to_binary(Value0)), + {ok, Value} = 'OTP-PUB-KEY':decode(Type, iolist_to_binary(Value0)), Ext#'Extension'{extnValue=transform(Value,decode)} end end, Exts). @@ -176,7 +176,7 @@ encode_extensions(Exts) -> Type -> Value1 = transform(Value0,encode), {ok, Value} = 'OTP-PUB-KEY':encode(Type, Value1), - Ext#'Extension'{extnValue=list_to_binary(Value)} + Ext#'Extension'{extnValue=Value} end end, Exts). diff --git a/lib/public_key/test/erl_make_certs.erl b/lib/public_key/test/erl_make_certs.erl index 254aa6d2f9..d6bdd05d01 100644 --- a/lib/public_key/test/erl_make_certs.erl +++ b/lib/public_key/test/erl_make_certs.erl @@ -137,10 +137,10 @@ decode_key(PemBin, Pw) -> encode_key(Key = #'RSAPrivateKey'{}) -> {ok, Der} = 'OTP-PUB-KEY':encode('RSAPrivateKey', Key), - {'RSAPrivateKey', list_to_binary(Der), not_encrypted}; + {'RSAPrivateKey', Der, not_encrypted}; encode_key(Key = #'DSAPrivateKey'{}) -> {ok, Der} = 'OTP-PUB-KEY':encode('DSAPrivateKey', Key), - {'DSAPrivateKey', list_to_binary(Der), not_encrypted}. + {'DSAPrivateKey', Der, not_encrypted}. make_tbs(SubjectKey, Opts) -> Version = list_to_atom("v"++integer_to_list(proplists:get_value(version, Opts, 3))), -- cgit v1.2.3