-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsolete CryptoConfig.EncodeOID #55579
Comments
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsBackground and MotivationInspired by #54087. We have
Now that there is Proposed APInamespace System.Security.Cryptography {
public partial class CryptoConfig {
+ [Obsolete("EncodeOID is obsolete. Use the ASN.1 functionality provided in to System.Formats.Asn1 package.")]
public static byte[] EncodeOID(string str);
}
}
<table>
<tr>
<th align="left">Author:</th>
<td>vcsjones</td>
</tr>
<tr>
<th align="left">Assignees:</th>
<td>-</td>
</tr>
<tr>
<th align="left">Labels:</th>
<td>
`api-suggestion`, `area-System.Security`, `untriaged`
</td>
</tr>
<tr>
<th align="left">Milestone:</th>
<td>-</td>
</tr>
</table>
</details> |
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);
}
} |
@vcsjones From the self assignment I assume you saw I set this as 6.0 and are starting on it now. 😄 |
Almost done. |
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.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 fromEncodeOID
, 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); } }
The text was updated successfully, but these errors were encountered: