/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
H A D | mbedtls_pkcs7.c | 633 static bool IsSigedDataOid(const Pkcs7 *pkcs7) in IsSigedDataOid() argument 635 return !MBEDTLS_OID_CMP(MBEDTLS_OID_PKCS7_SIGNED_DATA, &pkcs7->contentTypeOid); in IsSigedDataOid() 638 static void FreeSignedDataDigestAlgs(Pkcs7 *pkcs7) in FreeSignedDataDigestAlgs() argument 640 DigestAlgId *alg = pkcs7->signedData.digestAlgIds.next; in FreeSignedDataDigestAlgs() 648 pkcs7->signedData.digestAlgIds.next = NULL; in FreeSignedDataDigestAlgs() 673 static void FreeSignersInfo(Pkcs7 *pkcs7) in FreeSignersInfo() argument 675 SignerInfo *signer = pkcs7->signedData.signers.next; in FreeSignersInfo() 685 pkcs7->signedData.signers.next = NULL; in FreeSignersInfo() 686 FreeSignerCerts(&pkcs7->signedData.signers); in FreeSignersInfo() 687 FreeSignerIssuer(&pkcs7 in FreeSignersInfo() 690 FreeSignedDataCerts(Pkcs7 *pkcs7) FreeSignedDataCerts() argument 699 FreeSignedDataCrl(Pkcs7 *pkcs7) FreeSignedDataCrl() argument 864 PKCS7_VerifySignerSignature(const Pkcs7 *pkcs7, PKCS7_CalcDigest calcDigest) PKCS7_VerifySignerSignature() argument 1021 VerifyClicert(mbedtls_x509_crt *clicert, mbedtls_x509_crt *rootCert, const Pkcs7 *pkcs7) VerifyClicert() argument 1039 PKCS7_VerifyCertsChain(const Pkcs7 *pkcs7) PKCS7_VerifyCertsChain() argument 1172 PKCS7_GetAllSignersResolvedInfo(const Pkcs7 *pkcs7) PKCS7_GetAllSignersResolvedInfo() argument 1275 PKCS7_GetContentData(const Pkcs7 *pkcs7, unsigned char **data, size_t *dataLen) PKCS7_GetContentData() argument 1329 PKCS7_ParseSignedData(const unsigned char *buf, size_t bufLen, Pkcs7 *pkcs7) PKCS7_ParseSignedData() argument 1386 PKCS7_FreeRes(Pkcs7 *pkcs7) PKCS7_FreeRes() argument [all...] |
H A D | app_verify.c | 251 static int32_t CalcCmpContHash(const Pkcs7 *pkcs7, const SignerInfo *signer, in CalcCmpContHash() argument 259 rc = PKCS7_GetContentData((Pkcs7 *)pkcs7, &input, &inputLen); in CalcCmpContHash() 288 static int32_t CalcDigest(const Pkcs7 *pkcs7, const SignerInfo *signer, in CalcDigest() argument 294 rc = CalcCmpContHash(pkcs7, signer, algType, hash, hashLen); in CalcDigest() 495 Pkcs7 *pkcs7 = APPV_MALLOC(sizeof(Pkcs7)); in VerifyProfileSignGetRaw() local 496 P_NULL_RETURN_WTTH_LOG(pkcs7); in VerifyProfileSignGetRaw() 498 int32_t ret = PKCS7_ParseSignedData((unsigned char *)buf, (size_t)len, pkcs7); in VerifyProfileSignGetRaw() 501 LOG_INFO("pkcs7 parse message success"); in VerifyProfileSignGetRaw() 504 ret = PKCS7_VerifyCertsChain(pkcs7); in VerifyProfileSignGetRaw() 509 ret = GetProfileSingerCertType(pkcs7, in VerifyProfileSignGetRaw() 1064 Pkcs7 *pkcs7 = APPV_MALLOC(sizeof(Pkcs7)); GetBinSignPkcs() local 1102 Pkcs7 *pkcs7 = GetBinSignPkcs(signBuf, (size_t)blockLen); VerifyBinSign() local [all...] |
/base/security/appverify/interfaces/innerkits/appverify_lite/include/ |
H A D | mbedtls_pkcs7.h | 34 * if the pkcs7 format is pem, add this define in this header file 136 * contentTypeOid must be the pkcs7 signed-data oid 1.2.840.113549.1.7.2 148 * Description : parse the pkcs7 signed data, store the resolved data to pkcs7 149 * Input : buf - pkcs7 signed data 150 * bufLen - pkcs7 signed data length 151 * Output : pkcs7 - resolved pkcs7 data, caller provide this arg, malloc 159 int32_t PKCS7_ParseSignedData(const unsigned char *buf, size_t bufLen, Pkcs7 *pkcs7); 164 * Input : pkcs7 [all...] |
/base/security/appverify/interfaces/innerkits/appverify/src/interfaces/ |
H A D | hap_verify_result.cpp | 43 void HapVerifyResult::SetPkcs7SignBlock(const HapByteBuffer& pkcs7) in SetPkcs7SignBlock() argument 45 pkcs7SignBlock = pkcs7; in SetPkcs7SignBlock() 48 void HapVerifyResult::SetPkcs7ProfileBlock(const HapByteBuffer& pkcs7) in SetPkcs7ProfileBlock() argument 50 pkcs7ProfileBlock = pkcs7; in SetPkcs7ProfileBlock()
|
/base/security/code_signature/utils/src/ |
H A D | pkcs7_generator.cpp | 48 PKCS7Data pkcs7(md, cert);
in GenerateSignature() 49 if (!pkcs7.InitPKCS7Data(key.GetCarriedCerts())) {
in GenerateSignature() 56 if (!pkcs7.AddSignerInfo(signerInfo.GetSignerInfo())) {
in GenerateSignature() 63 if (!pkcs7.GetPKCS7Data(out)) {
in GenerateSignature()
|
H A D | signer_info.cpp | 21 #include <openssl/pkcs7.h>
51 ERR_LOG_WITH_OPEN_SSL_MSG("Create pkcs7 signer info failed");
in InitSignerInfo() 56 // set default information, pkcs7 signer info version is 1
in InitSignerInfo() 94 ERR_LOG_WITH_OPEN_SSL_MSG("Init pkcs7 signer info failed");
in InitSignerInfo()
|
/base/security/code_signature/services/key_enable/src/ |
H A D | profile_utils.rs | 28 use openssl::pkcs7::{Pkcs7, Pkcs7Flags}; 112 pkcs7: &Pkcs7, in parse_pkcs7_data() 117 let profile = verify_pkcs7_signature(pkcs7, root_store, flags)?; in parse_pkcs7_data() 123 pkcs7: &Pkcs7, in verify_pkcs7_signature() 129 pkcs7.verify(&stack_of_certs, root_store, None, Some(&mut profile), flags)?; in verify_pkcs7_signature() 226 pkcs7: &Pkcs7, in verify_signers() 230 let signers_result = pkcs7.signers(&stack_of_certs, Pkcs7Flags::empty())?; in verify_signers() 332 let pkcs7 = match Pkcs7::from_der(&pkcs7_data) { in process_profile() 335 error!(LOG_LABEL, "load profile to pkcs7 obj failed {}!", @public(path)); in process_profile() 339 if verify_signers(&pkcs7, profile_inf in process_profile() [all...] |
/base/security/appverify/interfaces/innerkits/appverify/include/interfaces/ |
H A D | hap_verify_result.h | 68 DLL_EXPORT void SetPkcs7SignBlock(const HapByteBuffer& pkcs7); 69 DLL_EXPORT void SetPkcs7ProfileBlock(const HapByteBuffer& pkcs7);
|
/base/update/updater/services/package/pkg_verify/ |
H A D | pkg_verify_util.cpp | 39 Pkcs7SignedData pkcs7; in VerifySourceDigest() local 42 int32_t ret = pkcs7.ReadSig(signature.data(), signature.size(), sigs); in VerifySourceDigest() 44 UPDATER_LAST_WORD("pkcs7", ret); in VerifySourceDigest() 83 PKG_LOGE("pkcs7 verify fail!"); in VerifySign() 114 PKG_LOGE("pkcs7 verify fail!"); in VerifyPackageSign() 181 Pkcs7SignedData pkcs7; in Pkcs7verify() local 183 return pkcs7.GetHashFromSignBlock(signature.data(), signature.size(), hash); in Pkcs7verify()
|
H A D | pkcs7_signed_data.h | 20 #include <openssl/pkcs7.h>
|
H A D | pkcs7_signed_data.cpp | 19 #include <openssl/pkcs7.h> 58 PKG_LOGE("parse pkcs7 data fail"); in GetHashFromSignBlock() 65 PKG_LOGE("verify pkcs7 data fail"); in GetHashFromSignBlock() 81 PKG_LOGE("init pkcs7 data fail"); in ParsePkcs7Data() 150 PKG_LOGE("Invalid pkcs7 data type %d", type); in Init() 180 PKG_LOGE("parse pkcs7 contentInfo fail"); in DoParse() 188 PKG_LOGE("invalid pkcs7 contentInfo fail"); in DoParse() 211 PKG_LOGE("invalid pkcs7 signed data!"); in ParseContentInfo() 218 PKG_LOGE("pkcs7 content is nullptr!"); in ParseContentInfo() 223 PKG_LOGE("invalid pkcs7 signe in ParseContentInfo() [all...] |
/base/security/code_signature/utils/include/ |
H A D | pkcs7_data.h | 20 #include <openssl/pkcs7.h>
|
H A D | signer_info.h | 22 #include <openssl/pkcs7.h>
|
/base/security/certificate_framework/frameworks/adapter/v1.0/src/ |
H A D | x509_cert_chain_openssl.c | 1650 PKCS7 *pkcs7 = d2i_PKCS7_bio(bio, NULL); // DER format .p7b file in CreateX509CertChainPKCS7() local 1651 if (pkcs7 == NULL) { in CreateX509CertChainPKCS7() 1658 /* Get cert chain from pkcs7 object */ in CreateX509CertChainPKCS7() 1660 int i = OBJ_obj2nid(pkcs7->type); in CreateX509CertChainPKCS7() 1661 if (i == NID_pkcs7_signed && pkcs7->d.sign != NULL) { in CreateX509CertChainPKCS7() 1662 oriCertsChain = pkcs7->d.sign->cert; in CreateX509CertChainPKCS7() 1663 } else if (i == NID_pkcs7_signedAndEnveloped && pkcs7->d.signed_and_enveloped != NULL) { in CreateX509CertChainPKCS7() 1664 oriCertsChain = pkcs7->d.signed_and_enveloped->cert; in CreateX509CertChainPKCS7() 1669 PKCS7_free(pkcs7); in CreateX509CertChainPKCS7() 1674 /* Clone a cert chain object for free pkcs7 objec in CreateX509CertChainPKCS7() [all...] |
H A D | x509_crl_openssl.c | 20 #include <openssl/pkcs7.h>
|
/base/security/code_signature/test/unittest/ |
H A D | sign_and_enforce_test.cpp | 21 #include <openssl/pkcs7.h>
|