69 references to PkcsUtils
System.Security (69)
system\security\cryptography\cryptographicattribute.cs (2)
37
this(new Oid(cryptAttribute.pszObjId),
PkcsUtils
.GetAsnEncodedDataCollection(cryptAttribute)) {
42
this(new Oid(cryptAttribute.pszObjId),
PkcsUtils
.GetAsnEncodedDataCollection(cryptAttribute)) {
system\security\cryptography\pkcs\envelopedpkcs7.cs (17)
165
return
PkcsUtils
.GetContent(m_safeCryptMsgHandle);
181
m_version = (int)
PkcsUtils
.GetVersion(m_safeCryptMsgHandle);
184
Oid contentType =
PkcsUtils
.GetContentType(m_safeCryptMsgHandle);
185
byte[] content =
PkcsUtils
.GetContent(m_safeCryptMsgHandle);
189
m_encryptionAlgorithm =
PkcsUtils
.GetAlgorithmIdentifier(m_safeCryptMsgHandle);
192
m_certificates =
PkcsUtils
.GetCertificates(m_safeCryptMsgHandle);
195
m_unprotectedAttributes =
PkcsUtils
.GetUnprotectedAttributes(m_safeCryptMsgHandle);
217
recipients =
PkcsUtils
.SelectRecipients(m_recipientIdentifierType);
357
PkcsUtils
.GetParam(m_safeCryptMsgHandle, CAPI.CMSG_CONTENT_PARAM, 0, out pbContent, out cbContent);
360
Oid contentType =
PkcsUtils
.GetContentType(m_safeCryptMsgHandle);
395
if ((
PkcsUtils
.GetRecipientInfoType(recipient.Certificate) == RecipientInfoType.KeyAgreement) ||
406
if (encryptParam.useCms && !
PkcsUtils
.CmsSupported()) {
511
if (CAPI.CMSG_ENVELOPED !=
PkcsUtils
.GetMessageType(safeCryptMsgHandle))
572
hr =
PkcsUtils
.GetCertPrivateKey(safeCertContextHandle, out safeCryptProvHandle, out keySpec);
607
keyLength = (uint)
PkcsUtils
.GetMaxKeyLength(hCryptProv, algId);
635
recipientInfoTypes[index] = (uint)
PkcsUtils
.GetRecipientInfoType(recipients[index].Certificate);
679
encryptParam.rgUnprotectedAttr = new SafeLocalAllocHandle(
PkcsUtils
.CreateCryptAttributes(unprotectedAttributes));
system\security\cryptography\pkcs\pkcs7recipient.cs (1)
64
if (!
PkcsUtils
.CmsSupported())
system\security\cryptography\pkcs\pkcs7signer.cs (1)
40
PkcsUtils
.CreateDummyCertificate(parameters)) {
system\security\cryptography\pkcs\pkcs9attribute.cs (6)
186
m_documentName =
PkcsUtils
.DecodeOctetString(RawData);
193
return
PkcsUtils
.EncodeOctetString(documentName);
243
m_documentDescription =
PkcsUtils
.DecodeOctetString(RawData);
250
return
PkcsUtils
.EncodeOctetString(documentDescription);
299
m_contentType = new Oid(
PkcsUtils
.DecodeObjectIdentifier(RawData, 2));
343
m_messageDigest =
PkcsUtils
.DecodeOctetBytes(RawData);
system\security\cryptography\pkcs\pkcsmisc.cs (7)
117
X509IssuerSerial issuerSerial =
PkcsUtils
.DecodeIssuerSerial(IssuerAndSerial);
125
X509IssuerSerial issuerSerial =
PkcsUtils
.DecodeIssuerSerial(certId.Value.IssuerSerialNumber);
165
if (!
PkcsUtils
.CmsSupported()) {
232
X509IssuerSerial issuerSerial =
PkcsUtils
.DecodeIssuerSerial(certId.Value.IssuerSerialNumber);
276
if (!
PkcsUtils
.CmsSupported()) {
284
if (!
PkcsUtils
.CmsSupported()) {
551
switch (
PkcsUtils
.GetMessageType(safeCryptMsgHandle)) {
system\security\cryptography\pkcs\recipientinfo.cs (3)
390
bool cmsSupported =
PkcsUtils
.CmsSupported();
421
PkcsUtils
.GetParam(safeCryptMsgHandle, CAPI.CMSG_CMS_RECIPIENT_INFO_PARAM, index, out pbCmsRecipientInfo, out cbCmsRecipientInfo);
456
PkcsUtils
.GetParam(safeCryptMsgHandle, CAPI.CMSG_RECIPIENT_INFO_PARAM, index, out pbCertInfo, out cbCertInfo);
system\security\cryptography\pkcs\signedpkcs7.cs (16)
89
return (int)
PkcsUtils
.GetVersion(m_safeCryptMsgHandle);
111
return
PkcsUtils
.GetCertificates(m_safeCryptMsgHandle);
131
return
PkcsUtils
.GetMessage(m_safeCryptMsgHandle);
145
Oid contentType =
PkcsUtils
.GetContentType(m_safeCryptMsgHandle);
146
byte[] content =
PkcsUtils
.GetContent(m_safeCryptMsgHandle);
185
signer.Certificate =
PkcsUtils
.SelectSignerCertificate();
247
RemoveSignature(
PkcsUtils
.GetSignerIndex(m_safeCryptMsgHandle, signerInfo, 0));
286
byte[] encodedMessage =
PkcsUtils
.GetMessage(m_safeCryptMsgHandle);
299
CAPI.CMSG_SIGNER_ENCODE_INFO signerEncodeInfo =
PkcsUtils
.CreateSignerEncodeInfo(signer, silent, out safeCryptProvHandle);
307
X509Certificate2Collection bagOfCerts =
PkcsUtils
.CreateBagOfCertificates(signer);
308
SafeLocalAllocHandle pEncodedBagOfCerts =
PkcsUtils
.CreateEncodedCertBlob(bagOfCerts);
345
encodedMessage =
PkcsUtils
.GetContent(safeCryptMsgHandle);
373
CAPI.CMSG_SIGNER_ENCODE_INFO signerEncodeInfo =
PkcsUtils
.CreateSignerEncodeInfo(signer, silent, out safeCryptProvHandle);
401
PkcsUtils
.AddCertsToMessage(m_safeCryptMsgHandle, Certificates,
PkcsUtils
.CreateBagOfCertificates(signer));
427
if (CAPI.CMSG_SIGNED !=
PkcsUtils
.GetMessageType(safeCryptMsgHandle))
system\security\cryptography\pkcs\signerinfo.cs (16)
96
m_certificate =
PkcsUtils
.FindCertificate(this.SignerIdentifier, m_signedCms.Certificates);
160
signer.Certificate =
PkcsUtils
.SelectSignerCertificate();
174
RemoveCounterSignature(
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), this, 0), index);
200
RemoveCounterSignature(
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), this, 0), index);
210
RemoveCounterSignature(
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), this, 0), index);
231
certificate =
PkcsUtils
.FindCertificate(SignerIdentifier, extraStore);
245
cvse.dwSignerIndex = (uint)
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), this, 0);
300
uint index = (uint)
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), this, 0);
305
CAPI.CMSG_SIGNER_ENCODE_INFO signerEncodeInfo =
PkcsUtils
.CreateSignerEncodeInfo(signer, out safeCryptProvHandle);
333
PkcsUtils
.AddCertsToMessage(m_signedCms.GetCryptMsgHandle(), m_signedCms.Certificates,
PkcsUtils
.CreateBagOfCertificates(signer));
450
index =
PkcsUtils
.GetSignerIndex(m_signedCms.GetCryptMsgHandle(), m_parentSignerInfo, index + 1);
468
PkcsUtils
.GetParam(m_signedCms.GetCryptMsgHandle(),
533
if (
PkcsUtils
.CmsSupported()) {
534
PkcsUtils
.GetParam(hMsg,
545
PkcsUtils
.GetParam(hMsg,