You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by #54087. We have CryptoConfig.EncodeOID to encoding an OID to ASN.1 DER. However it has a number of quirks in the way that it parses strings.
It does not handle the first two arcs correctly (e.g. 41.41.41.41)
"Supports" negative arcs.
Doesn't handle large integers.
etc
Now that there is System.Formats.Asn1, we have better tools for developers to use. I don't see any place within the Libraries that require developers to give us those bytes from EncodeOID, so there does not seem to be a case to keep using it, unless you are unintentionally giving it invalid OIDs.
Proposed API
namespace System.Security.Cryptography {
public partial class CryptoConfig {
+ [Obsolete("EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1.")]
public static byte[] EncodeOID(string str);
}
}
namespaceSystem.Security.Cryptography{publicpartialclassCryptoConfig{[Obsolete("EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1.")]publicstaticbyte[]EncodeOID(stringstr);}}
Activity
terrajobst commentedon Jul 13, 2021
bartonjs commentedon Jul 13, 2021
@vcsjones From the self assignment I assume you saw I set this as 6.0 and are starting on it now. 😄
vcsjones commentedon Jul 13, 2021
Almost done.