erlang/otp — pull request #131 by potatosalad (2013-11-08 00:41:26+00:00)
Title: public_key: Workaround for incorrectly encoded utf8 emailAddress

This pull request allows certificates with an improperly encoded emailAddress entry to be decoded.

It is very similar to commit 69d4a56d9f7ade14fd0496ffbf56d96bf9184aef from 2012-08-23 which did the same thing for improperly encoded X520countryName entries.

In addition to the extra test case for emailAddress, there is a minor spelling correction in public_key_SUITE related to the X520countryName test case (incorrect_cuntry_name to incorrect_country_name).

Most common browsers are lax in thier handling of how the
emailAddress field is encoded. RFC 3280 section 4.1.2.6
defines the encoding as IA5String, however browsers will
also handle certificates with the emailAddress field
encoded as UTF8String. This fix allows the emailAddress
to be decoded as both an IA5String and an UTF8String.