aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-11-15 10:54:23 +0100
committerFredrik Gustafsson <[email protected]>2013-11-15 10:54:23 +0100
commite582b503931e5644a9e8d5e7cfe7e00ce60d9f66 (patch)
treed2963af66509f4c2aa58cf4908fd82e22023bf5a /lib/public_key/src
parentf03339650039e4da871df142bd52f65f7aa586c1 (diff)
parentd7c2b664bee2b869c923ff45f9a95e2f873c05ad (diff)
downloadotp-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.erl9
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,