/base/security/certificate_framework/frameworks/adapter/v1.0/src/ |
H A D | x509_cert_chain_openssl_ex.c | 49 BIO *bio = BIO_new(BIO_s_mem());
in CfToString() local 50 if (bio == NULL) {
in CfToString() 56 int len = X509_print(bio, cert);
in CfToString() 59 BIO_free(bio);
in CfToString() 64 if (BIO_get_mem_ptr(bio, &bufMem) > 0 && bufMem != NULL) {
in CfToString() 66 BIO_free(bio);
in CfToString() 70 BIO_free(bio);
in CfToString() 89 BIO *bio = BIO_new(BIO_s_mem());
in CfHashCode() local 90 if (bio == NULL) {
in CfHashCode() 96 int len = i2d_X509_bio(bio, cer in CfHashCode() [all...] |
H A D | x509_cert_chain_validator_openssl.c | 19 #include <openssl/bio.h> 123 BIO *bio = BIO_new_mem_buf(data, len); in GetX509Cert() local 124 if (bio == NULL) { in GetX509Cert() 125 LOGE("Failed to new memory for bio."); in GetX509Cert() 130 x509 = d2i_X509_bio(bio, NULL); in GetX509Cert() 132 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL); in GetX509Cert() 135 BIO_free(bio); in GetX509Cert()
|
H A D | x509_cert_chain_openssl.c | 521 BIO *bio = BIO_new_mem_buf(inStream->data, inStream->len); in ParseX509CRL() local 522 if (bio == NULL) { in ParseX509CRL() 523 LOGE("bio get null!"); in ParseX509CRL() 530 crlOut = d2i_X509_CRL_bio(bio, NULL); in ParseX509CRL() 533 crlOut = PEM_read_bio_X509_CRL(bio, NULL, NULL, NULL); in ParseX509CRL() 539 BIO_free_all(bio); in ParseX509CRL() 940 static OCSP_RESPONSE *SendReqBioCustom(BIO *bio, const char *host, const char *path, OCSP_REQUEST *req) in SendReqBioCustom() argument 945 ctx = OCSP_sendreq_new(bio, path, NULL, -1); in SendReqBioCustom() 967 } while ((ret == -1) && BIO_should_retry(bio) && tryNum != 0); in SendReqBioCustom() 975 static bool ConnectToServer(BIO *bio, in argument 1057 BIO *bio = NULL; CreateConnectBio() local 1548 BIO *bio = BIO_new_mem_buf(inData->data, inData->len); CreateX509CertChainPEM() local 1643 BIO *bio = BIO_new_mem_buf(data, dataLength); CreateX509CertChainPKCS7() local [all...] |
H A D | x509_certificate_openssl.c | 20 #include <openssl/bio.h> 704 static CfResult CopyMemFromBIO(BIO *bio, CfBlob *outBlob) in CopyMemFromBIO() argument 706 if (bio == NULL || outBlob == NULL) { in CopyMemFromBIO() 710 int len = BIO_pending(bio); in CopyMemFromBIO() 720 if (BIO_read(bio, buff, len) <= 0) { in CopyMemFromBIO() 751 BIO *bio = BIO_new(BIO_s_mem()); in GetSubjectDNX509OpensslEx() local 752 if (bio == NULL) { in GetSubjectDNX509OpensslEx() 758 int ret = X509_NAME_print_ex(bio, subjectName, 0, XN_FLAG_SEP_COMMA_PLUS | ASN1_STRFLGS_UTF8_CONVERT); in GetSubjectDNX509OpensslEx() 765 res = CopyMemFromBIO(bio, out); in GetSubjectDNX509OpensslEx() 771 BIO_free(bio); in GetSubjectDNX509OpensslEx() 1268 BIO *bio = BIO_new(BIO_s_mem()); ToStringX509Openssl() local 2120 BIO *bio = BIO_new_mem_buf(encodingBlob->data, encodingBlob->len); CreateX509CertInner() local [all...] |
H A D | x509_crl_openssl.c | 770 BIO *bio = BIO_new(BIO_s_mem()); in ToString() local 771 if (bio == NULL) { in ToString() 776 int len = X509_CRL_print(bio, crl); in ToString() 779 BIO_free(bio); in ToString() 783 if (BIO_get_mem_ptr(bio, &bufMem) > 0 && bufMem != NULL) { in ToString() 785 BIO_free(bio); in ToString() 788 BIO_free(bio); in ToString() 1113 BIO *bio = BIO_new_mem_buf(inStream->data, inStream->len); in ParseX509CRL() local 1114 if (bio == NULL) { in ParseX509CRL() 1115 LOGE("bio ge in ParseX509CRL() [all...] |
/base/security/code_signature/utils/src/ |
H A D | pkcs7_data.cpp | 64 BIO *bio = BIO_new(BIO_s_mem());
in GetPKCS7Data() local 67 if (bio == nullptr) {
in GetPKCS7Data() 70 if (!i2d_PKCS7_bio(bio, p7_)) {
in GetPKCS7Data() 75 long tmpSize = BIO_get_mem_data(bio, &tmp);
in GetPKCS7Data() 84 BIO_free(bio);
in GetPKCS7Data()
|
H A D | signer_info.cpp | 246 BIO *bio = BIO_new_mem_buf(sigbuffer.GetBuffer(), sigbuffer.GetSize());
in ParseOwnerIdFromSignature() local 247 if (bio == nullptr) {
in ParseOwnerIdFromSignature() 251 PKCS7 *p7 = d2i_PKCS7_bio(bio, nullptr);
in ParseOwnerIdFromSignature() 253 BIO_free(bio);
in ParseOwnerIdFromSignature() 260 BIO_free(bio);
in ParseOwnerIdFromSignature() 274 BIO_free(bio);
in ParseOwnerIdFromSignature()
|
/base/security/certificate_manager/frameworks/cert_manager_standard/main/common/src/ |
H A D | cm_pfx.c | 19 #include <openssl/bio.h> 45 /* copy app terminal cert to bio */ in CmGetAppCertChain() 47 CM_LOG_E("Copy app cert to bio faild"); in CmGetAppCertChain() 52 /* copy app ca cert to bio */ in CmGetAppCertChain() 56 CM_LOG_E("Copy app ca cert to bio faild"); in CmGetAppCertChain() 88 BIO *bio = NULL; in CmParsePkcs12Cert() local 99 bio = BIO_new_mem_buf(p12Cert->data, p12Cert->size); in CmParsePkcs12Cert() 100 if (bio == NULL) { in CmParsePkcs12Cert() 106 p12 = d2i_PKCS12_bio(bio, NULL); in CmParsePkcs12Cert() 126 if (bio ! in CmParsePkcs12Cert() [all...] |
H A D | cm_x509.c | 19 #include <openssl/bio.h> 42 BIO *bio = BIO_new_mem_buf(certBuf, (int)size); in InitCertContext() local 43 if (!bio) { in InitCertContext() 48 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL); in InitCertContext() 51 x509 = d2i_X509_bio(bio, NULL); in InitCertContext() 55 BIO_free(bio); in InitCertContext()
|
/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/ |
H A D | rsa_asy_key_generator_openssl.c | 311 static HcfResult CopyMemFromBIO(BIO *bio, HcfBlob *outBlob) in CopyMemFromBIO() argument 313 if (bio == NULL || outBlob == NULL) { in CopyMemFromBIO() 317 int len = BIO_pending(bio); in CopyMemFromBIO() 329 if (OpensslBioRead(bio, blob.data, blob.len) <= 0) { in CopyMemFromBIO() 340 static HcfResult CopyStrFromBIO(BIO *bio, char **returnString) in CopyStrFromBIO() argument 342 if (bio == NULL || returnString == NULL) { in CopyStrFromBIO() 346 int len = BIO_pending(bio); in CopyStrFromBIO() 356 if (OpensslBioRead(bio, *returnString, len) <= 0) { in CopyStrFromBIO() 421 BIO *bio = OpensslBioNew(OpensslBioSMem()); in EncodePriKeyToPKCS8() local 422 if (bio in EncodePriKeyToPKCS8() 462 BIO *bio = OpensslBioNew(OpensslBioSMem()); GetPubKeyPkcs1Pem() local 486 BIO *bio = OpensslBioNew(OpensslBioSMem()); GetPubKeyX509Pem() local 587 BIO *bio = OpensslBioNew(OpensslBioSMem()); GetPrikeyPkcs8Pem() local 611 BIO *bio = OpensslBioNew(OpensslBioSMem()); GetPrikeyPkcs1Pem() local [all...] |
/base/security/certificate_framework/frameworks/adapter/v2.0/src/ |
H A D | cf_adapter_cert_openssl.c | 21 #include <openssl/bio.h>
60 BIO *bio = BIO_new_mem_buf(inData->data, inData->len);
in CreateX509Cert() local 61 if (bio == NULL) {
in CreateX509Cert() 69 certObj->x509Cert = PEM_read_bio_X509(bio, NULL, NULL, NULL);
in CreateX509Cert() 71 certObj->x509Cert = d2i_X509_bio(bio, NULL);
in CreateX509Cert() 73 BIO_free(bio);
in CreateX509Cert()
|
/base/hiviewdfx/hiview/core/param_update/src/ |
H A D | log_sign_tools.cpp | 57 BIO *bio = BIO_new_file(pubKeyPath.c_str(), "r"); in VerifyFileSign() local 58 if (PEM_read_bio_RSA_PUBKEY(bio, &pubKey, nullptr, nullptr) == nullptr) { in VerifyFileSign() 60 BIO_free(bio); in VerifyFileSign() 64 BIO_free(bio); in VerifyFileSign()
|
/base/security/code_signature/test/unittest/ |
H A D | sign_and_enforce_test.cpp | 95 BIO *bio = BIO_new(BIO_s_mem());
in DumpPKCS7Data() local 98 if (bio == nullptr) {
in DumpPKCS7Data() 101 if (!i2d_PKCS7_bio(bio, p7)) {
in DumpPKCS7Data() 105 long tmpSize = BIO_get_mem_data(bio, &tmp);
in DumpPKCS7Data() 114 BIO_free(bio);
in DumpPKCS7Data()
|
/base/hiviewdfx/hiview/core/param_update/include/ |
H A D | log_sign_tools.h | 23 #include <openssl/bio.h>
|
/base/security/crypto_framework/plugin/openssl_plugin/common/src/ |
H A D | openssl_common.c | 577 LOGE("Failed to read private key from bio."); in PrivateKeyReadNullCb() 583 BIO *bio = OpensslBioNew(OpensslBioSMem()); in ConvertPriPemStrToKey() local 584 if (bio == NULL) { in ConvertPriPemStrToKey() 585 LOGE("Failed to init bio."); in ConvertPriPemStrToKey() 590 if (OpensslBioWrite(bio, keyStr, strlen(keyStr)) <= 0) { in ConvertPriPemStrToKey() 591 OpensslBioFreeAll(bio); in ConvertPriPemStrToKey() 592 LOGE("Failed to write pem private key to bio"); in ConvertPriPemStrToKey() 597 EVP_PKEY *pkeyRet = OpensslPemReadBioPrivateKey(bio, pkey, PrivateKeyReadNullCb, NULL); in ConvertPriPemStrToKey() 598 OpensslBioFreeAll(bio); in ConvertPriPemStrToKey() 600 LOGE("Failed to read private key from bio"); in ConvertPriPemStrToKey() [all...] |
/base/global/i18n/frameworks/intl/src/ |
H A D | signature_verifier.cpp | 176 BIO* bio = BIO_new_file(pubkeyPath.c_str(), "r"); in VerifyFileSign() local 177 if (PEM_read_bio_RSA_PUBKEY(bio, &pubkey, nullptr, nullptr) == nullptr) { in VerifyFileSign() 178 BIO_free(bio); in VerifyFileSign() 182 BIO_free(bio); in VerifyFileSign()
|
/base/security/huks/frameworks/huks_standard/main/core/src/ |
H A D | hks_verifier.c | 19 #include <openssl/bio.h>
156 BIO *bio = BIO_new_mem_buf(cert->data, cert->length);
in GetX509FormatCert() local 157 HKS_IF_NULL_RETURN(bio, x509)
in GetX509FormatCert() 160 x509 = d2i_X509_bio(bio, NULL);
in GetX509FormatCert() 162 x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
in GetX509FormatCert() 165 BIO_free(bio);
in GetX509FormatCert()
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/key_agreement/src/ |
H A D | x25519_openssl.c | 18 #include <openssl/bio.h>
|
H A D | dh_openssl.c | 19 #include <openssl/bio.h>
|
H A D | ecdh_openssl.c | 18 #include <openssl/bio.h>
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_service.c | 20 #include <openssl/bio.h> 579 BIO *bio = BIO_new(BIO_s_mem()); in CmX509ToPEM() local 580 if (!bio) { in CmX509ToPEM() 586 if (PEM_write_bio_X509(bio, (X509 *)x509) == 0) { in CmX509ToPEM() 592 long pemCertLen = BIO_get_mem_data(bio, &pemCert); in CmX509ToPEM() 609 BIO_free(bio); in CmX509ToPEM()
|
/base/update/updater/services/package/pkg_algorithm/ |
H A D | pkg_algo_sign.h | 18 #include <openssl/bio.h>
|
H A D | pkg_algo_sign.cpp | 16 #include <openssl/bio.h>
|
/base/security/certificate_framework/test/unittest/v1.0/src/ |
H A D | cf_mock.cpp | 76 X509_CRL *__real_X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout); 276 ON_CALL(*this, X509_CRL_load_http).WillByDefault([this](const char *url, BIO *bio, BIO *rbio, int timeout) { in SetMockFunDefaultBehaviorPartThree() 277 return __real_X509_CRL_load_http(url, bio, rbio, timeout); in SetMockFunDefaultBehaviorPartThree() 848 X509_CRL *__wrap_X509_CRL_load_http(const char *url, BIO *bio, BIO *rbio, int timeout) in __wrap_X509_CRL_load_http() argument 852 return X509OpensslMock::GetInstance().X509_CRL_load_http(url, bio, rbio, timeout); in __wrap_X509_CRL_load_http() 854 return __real_X509_CRL_load_http(url, bio, rbio, timeout); in __wrap_X509_CRL_load_http()
|
/base/security/certificate_framework/test/unittest/v1.0/include/ |
H A D | cf_mock.h | 85 MOCK_METHOD(X509_CRL *, X509_CRL_load_http, (const char *url, BIO *bio, BIO *rbio, int timeout));
|