Avoid unnecessary Oid lookups in AsnReader
authorFilip Navara <filip.navara@gmail.com>
Fri, 7 Sep 2018 21:21:26 +0000 (23:21 +0200)
committerJeremy Barton <jbarton@microsoft.com>
Fri, 7 Sep 2018 21:21:26 +0000 (14:21 -0700)
commit4afb800882bf485ca0b83e189f3f6a2ab29aef7a
tree6b7b240f93bdb0ac496534dd83ed8203e66ea2e2
parentec0a0f3b1c3c93e72ef48dcd71a139bb56abda83
Avoid unnecessary Oid lookups in AsnReader

* Use `new Oid(value, null)` in AsnReader to let FriendlyName be populated on demand and remove the skipFriendlyName parameter from ReadObjectIdentifier.
* Remove the AsnSerializer support for PopulateFriendlyName(=false) as there's no option anymore.

Commit migrated from https://github.com/dotnet/corefx/commit/a0bfefddf0fba1244fefb58ae79cf56a1f853629
src/libraries/Common/src/System/Security/Cryptography/Asn1V2.Serializer.cs
src/libraries/Common/src/System/Security/Cryptography/AsnReader.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadObjectIdentifier.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Reader/ReadSequence.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Serializer/SimpleDeserialize.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Asn1/Serializer/SimpleSerialize.cs
src/libraries/System.Security.Cryptography.Encoding/tests/Resources/Strings.resx
src/libraries/System.Security.Cryptography.Pkcs/src/Resources/Strings.resx
src/libraries/System.Security.Cryptography.X509Certificates/src/Resources/Strings.resx