Closed
Description
Background and Motivation
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);
}
}