/base/security/certificate_framework/frameworks/common/v1.0/src/ |
D | cf_blob.c | 45 void CfEncodingBlobDataFree(CfEncodingBlob *encodingBlob) in CfEncodingBlobDataFree() argument 47 if ((encodingBlob == NULL) || (encodingBlob->data == NULL)) { in CfEncodingBlobDataFree() 51 CfFree(encodingBlob->data); in CfEncodingBlobDataFree() 52 encodingBlob->data = NULL; in CfEncodingBlobDataFree() 53 encodingBlob->len = 0; in CfEncodingBlobDataFree()
|
/base/security/certificate_framework/frameworks/js/napi/certificate/src/ |
D | napi_cert_utils.cpp | 117 static bool GetDataOfEncodingBlob(napi_env env, napi_value data, CfEncodingBlob *encodingBlob) in GetDataOfEncodingBlob() argument 142 encodingBlob->data = static_cast<uint8_t *>(HcfMalloc(length, 0)); in GetDataOfEncodingBlob() 143 if (encodingBlob->data == nullptr) { in GetDataOfEncodingBlob() 147 if (memcpy_s(encodingBlob->data, length, rawData, length) != EOK) { in GetDataOfEncodingBlob() 149 CfFree(encodingBlob->data); in GetDataOfEncodingBlob() 150 encodingBlob->data = nullptr; in GetDataOfEncodingBlob() 153 encodingBlob->len = length; in GetDataOfEncodingBlob() 157 bool GetEncodingBlobFromValue(napi_env env, napi_value obj, CfEncodingBlob **encodingBlob) in GetEncodingBlobFromValue() argument 159 *encodingBlob = static_cast<CfEncodingBlob *>(HcfMalloc(sizeof(CfEncodingBlob), 0)); in GetEncodingBlobFromValue() 160 if (*encodingBlob == nullptr) { in GetEncodingBlobFromValue() [all …]
|
D | napi_cert_extension.cpp | 39 CfEncodingBlob *encodingBlob = nullptr; member 94 CfEncodingBlobDataFree(context->encodingBlob); in DeleteExtsAsyncContext() 95 CfFree(context->encodingBlob); in DeleteExtsAsyncContext() 96 context->encodingBlob = nullptr; in DeleteExtsAsyncContext() 110 if (!GetEncodingBlobFromValue(env, argv[PARAM0], &context->encodingBlob)) { in ParseCreateExtsJSParams() 135 …context->async->errCode = CfCreate(CF_OBJ_TYPE_EXTENSION, context->encodingBlob, &context->extsObj… in CreateCertExtsExecute()
|
D | napi_x509_crl_entry.cpp | 137 …CfEncodingBlob *encodingBlob = static_cast<CfEncodingBlob *>(HcfMalloc(sizeof(CfEncodingBlob), 0)); in GetEncodedExecute() local 138 if (encodingBlob == nullptr) { in GetEncodedExecute() 145 context->errCode = x509CrlEntry->getEncoded(x509CrlEntry, encodingBlob); in GetEncodedExecute() 150 context->encoded = encodingBlob; in GetEncodedExecute()
|
D | napi_x509_crl.cpp | 42 CfEncodingBlob *encodingBlob = nullptr; member 71 CfEncodingBlobDataFree(context->encodingBlob); in FreeCryptoFwkCtx() 72 CfFree(context->encodingBlob); in FreeCryptoFwkCtx() 73 context->encodingBlob = nullptr; in FreeCryptoFwkCtx() 158 …CfEncodingBlob *encodingBlob = static_cast<CfEncodingBlob *>(HcfMalloc(sizeof(CfEncodingBlob), 0)); in GetEncodedExecute() local 159 if (encodingBlob == nullptr) { in GetEncodedExecute() 165 context->errCode = x509Crl->getEncoded(x509Crl, encodingBlob); in GetEncodedExecute() 170 context->encoded = encodingBlob; in GetEncodedExecute() 925 context->errCode = HcfX509CrlCreate(context->encodingBlob, &context->crl); in CreateX509CrlExecute() 978 if (!GetEncodingBlobFromValue(env, argv[PARAM0], &context->encodingBlob)) { in NapiCreateX509Crl()
|
D | napi_x509_certificate.cpp | 43 CfEncodingBlob *encodingBlob = nullptr; member 82 CfEncodingBlobDataFree(context->encodingBlob); in FreeCryptoFwkCtx() 83 CfFree(context->encodingBlob); in FreeCryptoFwkCtx() 84 context->encodingBlob = nullptr; in FreeCryptoFwkCtx() 167 …CfEncodingBlob *encodingBlob = static_cast<CfEncodingBlob *>(HcfMalloc(sizeof(CfEncodingBlob), 0)); in GetEncodedExecute() local 168 if (encodingBlob == nullptr) { in GetEncodedExecute() 174 context->errCode = cert->base.getEncoded(&(cert->base), encodingBlob); in GetEncodedExecute() 179 context->encoded = encodingBlob; in GetEncodedExecute() 946 context->errCode = HcfX509CertificateCreate(context->encodingBlob, &context->cert); in CreateX509CertExecute() 952 context->errCode = CfCreate(CF_OBJ_TYPE_CERT, context->encodingBlob, &context->object); in CreateX509CertExecute() [all …]
|
/base/security/certificate_framework/frameworks/js/napi/certificate/inc/ |
D | napi_cert_utils.h | 42 bool GetEncodingBlobFromValue(napi_env env, napi_value object, CfEncodingBlob **encodingBlob); 50 napi_value ConvertEncodingBlobToNapiValue(napi_env env, CfEncodingBlob *encodingBlob);
|
/base/security/certificate_framework/interfaces/innerkits/common/ |
D | cf_blob.h | 56 void CfEncodingBlobDataFree(CfEncodingBlob *encodingBlob);
|
/base/security/certificate_framework/test/fuzztest/v1.0/x509crl_fuzzer/ |
D | x509crl_fuzzer.cpp | 158 CfEncodingBlob encodingBlob = { 0 }; in TestX509CrlPem() local 159 (void)x509CrlPem->getEncoded(x509CrlPem, &encodingBlob); in TestX509CrlPem() 160 if (encodingBlob.data != nullptr) { in TestX509CrlPem() 161 CfFree(encodingBlob.data); in TestX509CrlPem()
|
/base/security/certificate_framework/frameworks/adapter/v1.0/src/ |
D | x509_certificate_openssl.c | 879 static X509 *CreateX509CertInner(const CfEncodingBlob *encodingBlob) in CreateX509CertInner() argument 882 BIO *bio = BIO_new_mem_buf(encodingBlob->data, encodingBlob->len); in CreateX509CertInner() 887 LOGD("The input cert format is: %d.", encodingBlob->encodingFormat); in CreateX509CertInner() 888 if (encodingBlob->encodingFormat == CF_FORMAT_DER) { in CreateX509CertInner() 890 } else if (encodingBlob->encodingFormat == CF_FORMAT_PEM) { in CreateX509CertInner()
|