.Net Core中的CERTENROLLLib替代品 [英] CERTENROLLLib alternatives in .Net Core

查看:255
本文介绍了.Net Core中的CERTENROLLLib替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对证书请求PCKS#10进行解码,以获取所有必需的信息,例如公用名,密钥长度和最重要的主题备用名。

I would like to decode Certificate Requests PCKS #10 to obtain all necessary information such Common Name, Key Length and most important Subject Alternate Names.

以前在.Net WebFroms上,我使用CERTENROLLLib库和CX509ExtensionAlternativeNames / CX509CertificateRequestPkcs10类。现在,我正在寻找.Net Core中的替代产品

Previously on .Net WebFroms I used CERTENROLLLib library and CX509ExtensionAlternativeNames/CX509CertificateRequestPkcs10 classes. Now I'm looking for replacement in .Net Core

推荐答案

.NET Core和.NET Framework都没有内置支持阅读PKCS#10 Blob /证书签名请求。您需要使用第3方库(Portable.BouncyCastle可能起作用,并且可能会满足您的需要),或者阅读 RFC 2986 并自己​​解析数据。

Neither .NET Core nor .NET Framework has built-in support for reading PKCS#10 blobs / certificate signing requests. You'll need to use a 3rd party library (Portable.BouncyCastle might work, and might have what you need), or read RFC 2986 and parse the data yourself.

如果您不知道如何读取DER编码数据,请 ITU X.680 将解释ASN.1语法:

If you don't know how to read DER encoded data, ITU X.680 will explain the ASN.1 syntax:

CertificationRequestInfo ::= SEQUENCE {
    version       INTEGER { v1(0) } (v1,...),
    subject       Name,
    subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
    attributes    [0] Attributes{{ CRIAttributes }}
}

ITU X.690 将说明如何根据可分辨编码规则(DER)对ASN.1的结构进行编码。

And ITU X.690 will explain how the structures from ASN.1 are encoded under the Distinguished Encoding Rules (DER).

这篇关于.Net Core中的CERTENROLLLib替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆