/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/common/inc/ |
H A D | openssl_adapter.h | 124 EVP_PKEY *OpensslEvpPkeyNew(void); 131 void OpensslEvpPkeyFree(EVP_PKEY *pkey); 133 EVP_PKEY *pkey, const char *propquery); 149 int OpensslEvpPkeyBaseId(EVP_PKEY *pkey); 168 DSA *OpensslEvpPkeyGet1Dsa(EVP_PKEY *pkey); 186 EVP_PKEY *OpensslEvpPkeyDup(EVP_PKEY *a); 187 EVP_PKEY *OpensslD2iPubKey(EVP_PKEY **a, const unsigned char **pp, long length); 188 EVP_PKEY *OpensslD2iPrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length); 214 EVP_PKEY *OpensslD2iAutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length); 325 int OpensslEvpPkeySet1Dh(EVP_PKEY *pkey, DH *key); [all …]
|
H A D | openssl_common.h | 69 HcfResult KeyDerive(EVP_PKEY *priKey, EVP_PKEY *pubKey, HcfBlob *returnSecret); 71 HcfResult GetKeyEncodedPem(EVP_PKEY *pkey, const char *outPutStruct, int selection, char **returnSt…
|
H A D | openssl_class.h | 103 EVP_PKEY *pkey; 112 EVP_PKEY *pkey;
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/key_agreement/src/ |
H A D | ecdh_openssl.c | 33 static EVP_PKEY *AssignEcKeyToPkey(EC_KEY *ecKey) in AssignEcKeyToPkey() 35 EVP_PKEY *pKey = OpensslEvpPkeyNew(); in AssignEcKeyToPkey() 48 static EVP_PKEY *NewPKeyByEccPubKey(HcfOpensslEccPubKey *publicKey) in NewPKeyByEccPubKey() 54 EVP_PKEY *res = AssignEcKeyToPkey(ecKey); in NewPKeyByEccPubKey() 61 static EVP_PKEY *NewPKeyByEccPriKey(HcfOpensslEccPriKey *privateKey) in NewPKeyByEccPriKey() 67 EVP_PKEY *res = AssignEcKeyToPkey(ecKey); in NewPKeyByEccPriKey() 103 EVP_PKEY *priPKey = NewPKeyByEccPriKey((HcfOpensslEccPriKey *)priKey); in EngineGenerateSecret() 108 EVP_PKEY *pubPKey = NewPKeyByEccPubKey((HcfOpensslEccPubKey *)pubKey); in EngineGenerateSecret()
|
H A D | dh_openssl.c | 65 EVP_PKEY *pubPKey = NewEvpPkeyByDh(((HcfOpensslDhPubKey *)pubKey)->pk, true); in EngineGenerateSecret() 70 EVP_PKEY *priPKey = NewEvpPkeyByDh(((HcfOpensslDhPriKey *)priKey)->sk, true); in EngineGenerateSecret()
|
H A D | x25519_openssl.c | 64 EVP_PKEY *pubPKey = OpensslEvpPkeyDup(((HcfOpensslAlg25519PubKey *)pubKey)->pkey); in EngineGenerateSecret() 69 EVP_PKEY *priPKey = OpensslEvpPkeyDup(((HcfOpensslAlg25519PriKey *)priKey)->pkey); in EngineGenerateSecret()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/common/src/ |
H A D | openssl_adapter.c | 383 EVP_PKEY *pkey, const char *propquery) in OpensslEvpPkeyCtxNewFromPkey() 388 EVP_PKEY *OpensslEvpPkeyNew(void) in OpensslEvpPkeyNew() 423 void OpensslEvpPkeyFree(EVP_PKEY *pkey) in OpensslEvpPkeyFree() 480 int OpensslEvpPkeyBaseId(EVP_PKEY *pkey) in OpensslEvpPkeyBaseId() 571 DSA *OpensslEvpPkeyGet1Dsa(EVP_PKEY *pkey) in OpensslEvpPkeyGet1Dsa() 656 EVP_PKEY *OpensslEvpPkeyDup(EVP_PKEY *a) in OpensslEvpPkeyDup() 661 EVP_PKEY *OpensslD2iPubKey(EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iPubKey() 666 EVP_PKEY *OpensslD2iPrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iPrivateKey() 792 EVP_PKEY *OpensslD2iAutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iAutoPrivateKey() 1276 DH *OpensslEvpPkeyGet1Dh(EVP_PKEY *pkey) in OpensslEvpPkeyGet1Dh() [all …]
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/ |
H A D | openssl_adapter_mock.c | 639 EVP_PKEY *pkey, const char *propquery) in OpensslEvpPkeyCtxNewFromPkey() 647 EVP_PKEY *OpensslEvpPkeyNew(void) in OpensslEvpPkeyNew() 695 void OpensslEvpPkeyFree(EVP_PKEY *pkey) in OpensslEvpPkeyFree() 810 int OpensslEvpPkeyBaseId(EVP_PKEY *pkey) in OpensslEvpPkeyBaseId() 907 DSA *OpensslEvpPkeyGet1Dsa(EVP_PKEY *pkey) in OpensslEvpPkeyGet1Dsa() 1042 EVP_PKEY *OpensslEvpPkeyDup(EVP_PKEY *a) in OpensslEvpPkeyDup() 1050 EVP_PKEY *OpensslD2iPubKey(EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iPubKey() 1058 EVP_PKEY *OpensslD2iPrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iPrivateKey() 1195 EVP_PKEY *OpensslD2iAutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length) in OpensslD2iAutoPrivateKey() 1809 DH *OpensslEvpPkeyGet1Dh(EVP_PKEY *pkey) in OpensslEvpPkeyGet1Dh() [all …]
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/ |
H A D | alg_25519_asy_key_generator_openssl.c | 336 EVP_PKEY *alg25519Pk = impl->pkey; in GetBigIntegerSpecFromAlg25519PubKey() 388 EVP_PKEY *alg25519Sk = impl->pkey; in GetBigIntegerSpecFromAlg25519PriKey() 602 EVP_PKEY *pkey = NULL; in GenerateAlg25519PubAndPriKey() 783 EVP_PKEY **returnAlg25519) in CreateOpensslAlg25519PubKey() 785 EVP_PKEY *pubkey = NULL; in CreateOpensslAlg25519PubKey() 804 EVP_PKEY **returnAlg25519) in CreateOpensslAlg25519PriKey() 806 EVP_PKEY *privkey = NULL; in CreateOpensslAlg25519PriKey() 827 EVP_PKEY *alg25519 = NULL; in CreateAlg25519PubKeyByKeyPairSpec() 843 EVP_PKEY *alg25519 = NULL; in CreateAlg25519PriKeyByKeyPairSpec() 886 EVP_PKEY *alg25519 = NULL; in CreateAlg25519PubKeyByPubKeySpec() [all …]
|
H A D | dh_common_param_spec_generator_openssl.c | 30 static HcfResult GenerateDhUnknownGroupEvpKey(int32_t pLen, EVP_PKEY **ppkey) in GenerateDhUnknownGroupEvpKey() 63 static HcfResult GenerateDhKnownGroupEvpKey(int32_t skLen, char *nidName, EVP_PKEY **ppkey) in GenerateDhKnownGroupEvpKey() 108 static HcfResult BuildCommonParam(EVP_PKEY *dhKey, HcfDhCommParamsSpecSpi *returnCommonParamSpec) in BuildCommonParam() 153 EVP_PKEY *dhKey = NULL; in HcfDhCommonParamSpecCreate()
|
H A D | dh_asy_key_generator_openssl.c | 40 static void FreeCtx(EVP_PKEY_CTX *paramsCtx, EVP_PKEY *paramsPkey, EVP_PKEY_CTX *pkeyCtx) in FreeCtx() 184 EVP_PKEY *pKey = NewEvpPkeyByDh(impl->pk, true); in GetDhPubKeyEncoded() 222 EVP_PKEY *pKey = NewEvpPkeyByDh(impl->sk, true); in GetDhPriKeyEncoded() 425 static EVP_PKEY *ConstructDhOsslParamsAndGenPkey(int32_t dhId, EVP_PKEY_CTX *paramsCtx) in ConstructDhOsslParamsAndGenPkey() 427 EVP_PKEY *paramsPkey = NULL; in ConstructDhOsslParamsAndGenPkey() 451 static HcfResult GenerateDhEvpKey(int32_t dhId, EVP_PKEY **ppkey) in GenerateDhEvpKey() 454 EVP_PKEY *paramsPkey = NULL; in GenerateDhEvpKey() 581 static HcfResult GeneratePubKeyByPkey(EVP_PKEY *pkey, HcfOpensslDhPubKey **returnPubKey) in GeneratePubKeyByPkey() 616 EVP_PKEY *pkey = NULL; in GenerateDhPubAndPriKey() 917 EVP_PKEY *pKey = OpensslD2iPubKey(NULL, &temp, pubKeyBlob->len); in ConvertDhPubKey() [all …]
|
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
H A D | hks_openssl_curve25519.c | 31 static int32_t SaveCurve25519KeyMaterial(uint32_t algType, const EVP_PKEY *pKey, struct HksBlob *ke… in SaveCurve25519KeyMaterial() 78 EVP_PKEY *pkey = NULL; in HksOpensslCurve25519GenerateKey() 113 static int32_t ImportX25519EvpKey(EVP_PKEY **ours, EVP_PKEY **theirs, const struct HksBlob *nativeK… in ImportX25519EvpKey() 145 EVP_PKEY *ours = NULL; in HksOpensslX25519AgreeKey() 146 EVP_PKEY *theirs = NULL; in HksOpensslX25519AgreeKey() 226 EVP_PKEY *edKeyPri = EVP_PKEY_new_raw_private_key(EVP_PKEY_ED25519, NULL, in HksOpensslEd25519Sign() 272 EVP_PKEY *edKeyPub = EVP_PKEY_new_raw_public_key(EVP_PKEY_ED25519, NULL, in HksOpensslEd25519Verify()
|
H A D | hks_openssl_ecc.c | 337 static int32_t GetEvpKey(const struct HksBlob *keyBlob, EVP_PKEY *key, bool private) in GetEvpKey() 350 static int32_t GetNativePKey(const struct HksBlob *nativeKey, EVP_PKEY *key) in GetNativePKey() 357 static int32_t GetPeerKey(const struct HksBlob *pubKey, EVP_PKEY *key) in GetPeerKey() 364 static int32_t EcdhDerive(EVP_PKEY_CTX *ctx, EVP_PKEY *peerKey, struct HksBlob *sharedKey) in EcdhDerive() 396 EVP_PKEY *pKey = EVP_PKEY_new(); in AgreeKeyEcdh() 397 EVP_PKEY *peerKey = EVP_PKEY_new(); in AgreeKeyEcdh() 462 EVP_PKEY *key = EVP_PKEY_new(); in InitEcdsaCtx()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ffi/ |
H A D | x509.rs | 16 pub(crate) enum EVP_PKEY {} enum 19 pub(crate) fn EVP_PKEY_free(ctx: *mut EVP_PKEY); in EVP_PKEY_free() argument 74 pub(crate) fn X509_get_pubkey(a: *mut C_X509) -> *mut EVP_PKEY; in X509_get_pubkey() argument 76 pub(crate) fn X509_verify(a: *mut C_X509, pkey: *mut EVP_PKEY) -> c_int; in X509_verify()
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/ |
H A D | openssl_dsa_helper.h | 31 EVP_PKEY *GenerateDsaKey(const uint32_t keySize); 33 bool DsaGetx509PubKey(EVP_PKEY *pkey, struct HksBlob *x509Key); 43 int32_t SaveDsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key);
|
H A D | openssl_rsa_helper.h | 31 int32_t SaveRsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key); 33 EVP_PKEY *GenerateRsaKey(const uint32_t keySize); 35 bool OpensslGetx509PubKey(EVP_PKEY *pkey, struct HksBlob *x509Key);
|
/ohos5.0/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_app_cert_process.c | 191 static int32_t SaveKeyMaterialCurve25519(uint32_t algType, const EVP_PKEY *pKey, struct CmBlob *key… in SaveKeyMaterialCurve25519() 233 static int32_t ImportRsaKey(const EVP_PKEY *priKey, const struct CmBlob *keyUri) in ImportRsaKey() 238 const RSA *rsa = EVP_PKEY_get0_RSA((EVP_PKEY *)priKey); in ImportRsaKey() 271 static int32_t ImportEccKey(const EVP_PKEY *priKey, const struct CmBlob *keyUri) in ImportEccKey() 276 const EC_KEY *eccKey = EVP_PKEY_get0_EC_KEY((EVP_PKEY *)priKey); in ImportEccKey() 310 static int32_t ImportEd25519Key(const EVP_PKEY *priKey, const struct CmBlob *keyUri) in ImportEd25519Key() 336 static int32_t ImportKeyPair(const EVP_PKEY *priKey, const struct CmBlob *keyUri) in ImportKeyPair() 410 EVP_PKEY **priKey, struct CertName *certName, struct AppCert *appCert) in GetCredCertName() 440 struct AppCert *appCert, EVP_PKEY *priKey, struct CmBlob *keyUri) in StoreKeyAndCert() 467 EVP_PKEY *priKey = NULL; in CmInstallAppCertPro()
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
H A D | openssl_rsa_helper.c | 29 int32_t SaveRsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key) in SaveRsaKeyToHksBlob() 67 EVP_PKEY *GenerateRsaKey(const uint32_t keySize) in GenerateRsaKey() 88 EVP_PKEY *pkey = EVP_PKEY_new(); in GenerateRsaKey() 103 bool OpensslGetx509PubKey(EVP_PKEY *pkey, struct HksBlob *x509Key) in OpensslGetx509PubKey() 129 EVP_PKEY *pkey = d2i_PUBKEY(NULL, (const unsigned char **)&data, x509Key->size); in X509ToRsaPublicKey() 243 EVP_PKEY *pkey = EVP_PKEY_new(); in EncryptRsa() 291 EVP_PKEY *pkey = EVP_PKEY_new(); in DecryptRsa() 338 EVP_PKEY *pkey = NULL; in InitRsaCtx() 430 EVP_PKEY *pkey = EVP_PKEY_new(); in OpensslSignRsa() 492 EVP_PKEY *pkey = EVP_PKEY_new(); in OpensslVerifyRsa()
|
H A D | openssl_dsa_helper.c | 31 EVP_PKEY *GenerateDsaKey(const uint32_t keySize) in GenerateDsaKey() 46 EVP_PKEY *pkey = EVP_PKEY_new(); in GenerateDsaKey() 163 EVP_PKEY *pkey = EVP_PKEY_new(); in OpensslSignDsa() 217 EVP_PKEY *pkey = EVP_PKEY_new(); in OpensslVerifyDsa() 264 EVP_PKEY *pkey = d2i_PUBKEY(NULL, (const unsigned char **)&data, x509Key->size); in X509ToDsaPublicKey() 318 bool DsaGetx509PubKey(EVP_PKEY *pkey, struct HksBlob *x509Key) in DsaGetx509PubKey() 340 int32_t SaveDsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key) in SaveDsaKeyToHksBlob()
|
H A D | openssl_ecc_helper.c | 269 EVP_PKEY *key = EVP_PKEY_new(); in InitEccMdCtx() 347 EVP_PKEY *key = EVP_PKEY_new(); in InitEcdsaCtx() 515 EVP_PKEY *pkey = d2i_PUBKEY(NULL, (const unsigned char **)&data, x509Key->size); in X509ToHksBlob() 562 EVP_PKEY *pkey = EVP_PKEY_new(); in HksBlobToX509() 594 int32_t GetNativePkey(const struct HksBlob *nativeKey, EVP_PKEY *key) in GetNativePkey() 608 int32_t GetPeerKey(const struct HksBlob *pubKey, EVP_PKEY *key) in GetPeerKey() 622 int32_t EcdhDerive(EVP_PKEY_CTX *ctx, EVP_PKEY *peerKey, struct HksBlob *sharedKey) in EcdhDerive() 655 EVP_PKEY *pKey = EVP_PKEY_new(); in EcdhAgreeKey() 656 EVP_PKEY *peerKey = EVP_PKEY_new(); in EcdhAgreeKey()
|
/ohos5.0/base/security/huks/utils/crypto_adapter/ |
H A D | hks_client_service_adapter.c | 54 static int32_t EvpKeyToX509Format(EVP_PKEY *pkey, struct HksBlob *x509Key) in EvpKeyToX509Format() 85 EVP_PKEY *pkey = NULL; in RsaToX509PublicKey() 158 EVP_PKEY *pkey = NULL; in EccToX509PublicKey() 246 EVP_PKEY *pkey = NULL; in DsaToX509PublicKey() 330 EVP_PKEY *pkey = NULL; in DhToX509PublicKey() 451 static int32_t X509PublicKeyToRsa(EVP_PKEY *pkey, struct HksBlob *rsaPublicKey) in X509PublicKeyToRsa() 544 static int32_t X509PublicKeyToEcc(const uint32_t alg, EVP_PKEY *pkey, struct HksBlob *eccPublicKey) in X509PublicKeyToEcc() 556 const uint32_t alg, uint32_t keyLen, const EVP_PKEY *pkey, struct HksBlob *sm2PublicKey) in EvpPkeyToHksPubKeyInfo() 637 static int32_t X509PublicKeyToDsa(EVP_PKEY *pkey, struct HksBlob *dsaPublicKey) in X509PublicKeyToDsa() 694 static int32_t X509PublicKeyToDh(EVP_PKEY *pkey, struct HksBlob *dhPublicKey) in X509PublicKeyToDh() [all …]
|
/ohos5.0/base/security/certificate_manager/test/unittest/module_test/src/ |
H A D | cm_cert_parse_test.cpp | 423 EVP_PKEY *pkey = nullptr; 447 EVP_PKEY *pkey = nullptr; 470 EVP_PKEY *pkey = nullptr; 494 EVP_PKEY *pkey = nullptr; 518 EVP_PKEY *pkey = nullptr; 543 EVP_PKEY *pkey = nullptr;
|
/ohos5.0/base/security/certificate_framework/test/unittest/v1.0/include/ |
H A D | cf_mock.h | 50 MOCK_METHOD(int, i2d_PUBKEY, (EVP_PKEY * a, unsigned char **pp)); 58 MOCK_METHOD(EVP_PKEY *, X509_get_pubkey, (X509 * x)); 74 MOCK_METHOD(int, X509_verify, (X509 * a, EVP_PKEY *r)); 104 …MOCK_METHOD(int, PKCS12_parse, (PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK…
|
/ohos5.0/base/security/certificate_framework/test/unittest/v1.0/src/ |
H A D | cf_mock.cpp | 39 int __real_i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp); 45 EVP_PKEY *__real_X509_get_pubkey(X509 *x); 64 int __real_X509_verify(X509 *a, EVP_PKEY *r); 93 int __real_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509)… 144 …ON_CALL(*this, X509_verify).WillByDefault([this](X509 *a, EVP_PKEY *r) { return __real_X509_verify… in SetMockFunDefaultBehaviorPartOne() 224 ON_CALL(*this, i2d_PUBKEY).WillByDefault([this](EVP_PKEY *a, unsigned char **pp) { in SetMockFunDefaultBehaviorPartTwo() 330 ….WillByDefault([this](PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) … in SetMockFunDefaultBehaviorPartFour() 518 int __wrap_i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp) in __wrap_i2d_PUBKEY() 598 EVP_PKEY *__wrap_X509_get_pubkey(X509 *x) in __wrap_X509_get_pubkey() 748 int __wrap_X509_verify(X509 *a, EVP_PKEY *r) in __wrap_X509_verify() [all …]
|
/ohos5.0/foundation/communication/netstack/frameworks/native/tls_socket/include/ |
H A D | tls_key.h | 63 EVP_PKEY *opaque_ = nullptr; 68 EVP_PKEY *genericKey_ = nullptr;
|