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