diff options
author | Fredrik Gustafsson <[email protected]> | 2013-11-15 10:54:23 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-11-15 10:54:23 +0100 |
commit | e582b503931e5644a9e8d5e7cfe7e00ce60d9f66 (patch) | |
tree | d2963af66509f4c2aa58cf4908fd82e22023bf5a /lib/public_key/src | |
parent | f03339650039e4da871df142bd52f65f7aa586c1 (diff) | |
parent | d7c2b664bee2b869c923ff45f9a95e2f873c05ad (diff) | |
download | otp-e582b503931e5644a9e8d5e7cfe7e00ce60d9f66.tar.gz otp-e582b503931e5644a9e8d5e7cfe7e00ce60d9f66.tar.bz2 otp-e582b503931e5644a9e8d5e7cfe7e00ce60d9f66.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/public_key/src')
-rw-r--r-- | lib/public_key/src/pubkey_cert_records.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl index 3226aacb3f..fdd89aa70d 100644 --- a/lib/public_key/src/pubkey_cert_records.erl +++ b/lib/public_key/src/pubkey_cert_records.erl @@ -67,6 +67,15 @@ transform(#'AttributeTypeAndValue'{type=Id,value=Value0} = ATAV, Func) -> {ok, {printableString, ASCCI}} -> {ok, ASCCI} end; + 'EmailAddress' when Func == decode -> + %% Workaround that some certificates break the ASN-1 spec + %% and encode emailAddress as utf8 + case 'OTP-PUB-KEY':Func('OTP-emailAddress', Value0) of + {ok, {utf8String, Utf8Value}} -> + {ok, unicode:characters_to_list(Utf8Value)}; + {ok, {ia5String, Ia5Value}} -> + {ok, Ia5Value} + end; Type when is_atom(Type) -> 'OTP-PUB-KEY':Func(Type, Value0); _UnknownType -> {ok, Value0} end, |