Home
last modified time | relevance | path

Searched refs:encodingBlob (Results 1 – 10 of 10) sorted by relevance

/base/security/certificate_framework/frameworks/common/v1.0/src/
Dcf_blob.c45 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/
Dnapi_cert_utils.cpp117 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 …]
Dnapi_cert_extension.cpp39 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()
Dnapi_x509_crl_entry.cpp137 …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()
Dnapi_x509_crl.cpp42 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()
Dnapi_x509_certificate.cpp43 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/
Dnapi_cert_utils.h42 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/
Dcf_blob.h56 void CfEncodingBlobDataFree(CfEncodingBlob *encodingBlob);
/base/security/certificate_framework/test/fuzztest/v1.0/x509crl_fuzzer/
Dx509crl_fuzzer.cpp158 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/
Dx509_certificate_openssl.c879 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()