/kernel/linux/linux-5.10/crypto/asymmetric_keys/ |
H A D | public_key.c | 68 software_key_determine_akcipher(const struct public_key *pkey, in software_key_determine_akcipher() argument 77 if (strcmp(pkey->pkey_algo, "rsa") == 0) { in software_key_determine_akcipher() 85 pkey->pkey_algo); in software_key_determine_akcipher() 89 pkey->pkey_algo, hash_algo); in software_key_determine_akcipher() 100 } else if (strncmp(pkey->pkey_algo, "ecdsa", 5) == 0) { in software_key_determine_akcipher() 118 } else if (strcmp(pkey->pkey_algo, "sm2") == 0) { in software_key_determine_akcipher() 125 } else if (strcmp(pkey->pkey_algo, "ecrdsa") == 0) { in software_key_determine_akcipher() 137 if (strscpy(alg_name, pkey->pkey_algo, CRYPTO_MAX_ALG_NAME) < 0) in software_key_determine_akcipher() 155 struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_query() local 160 ret = software_key_determine_akcipher(pkey, param in software_key_query() 214 const struct public_key *pkey = params->key->payload.data[asym_crypto]; software_key_eds_op() local 357 public_key_verify_signature(const struct public_key *pkey, const struct public_key_signature *sig) public_key_verify_signature() argument [all...] |
/kernel/linux/linux-6.6/arch/x86/include/asm/ |
H A D | pkeys.h | 12 extern int arch_set_user_pkey_access(struct task_struct *tsk, int pkey, 34 int prot, int pkey); 36 int prot, int pkey) in arch_override_mprotect_pkey() 41 return __arch_override_mprotect_pkey(vma, prot, pkey); in arch_override_mprotect_pkey() 47 #define mm_set_pkey_allocated(mm, pkey) do { \ 48 mm_pkey_allocation_map(mm) |= (1U << pkey); \ 50 #define mm_set_pkey_free(mm, pkey) do { \ 51 mm_pkey_allocation_map(mm) &= ~(1U << pkey); \ 55 bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey) in mm_pkey_is_allocated() argument 59 * from pkey_alloc() or pkey in mm_pkey_is_allocated() 35 arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot, int pkey) arch_override_mprotect_pkey() argument 108 mm_pkey_free(struct mm_struct *mm, int pkey) mm_pkey_free() argument [all...] |
/third_party/node/deps/openssl/openssl/crypto/pkcs12/ |
H A D | p12_kiss.c | 18 EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 21 int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 24 EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 29 * should point to a valid STACK structure. pkey and/or cert may be NULL; 33 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, in PKCS12_parse() argument 39 if (pkey != NULL) in PKCS12_parse() 40 *pkey = NULL; in PKCS12_parse() 82 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) { in PKCS12_parse() 93 if (pkey != NULL && *pkey ! in PKCS12_parse() 136 parse_pk12(PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) parse_pk12() argument 184 parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) parse_bag() argument [all...] |
/third_party/openssl/crypto/pkcs12/ |
H A D | p12_kiss.c | 18 EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 21 int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 24 EVP_PKEY **pkey, STACK_OF(X509) *ocerts); 29 * should point to a valid STACK structure. pkey and/or cert may be NULL; 33 int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, in PKCS12_parse() argument 39 if (pkey != NULL) in PKCS12_parse() 40 *pkey = NULL; in PKCS12_parse() 82 if (!parse_pk12(p12, pass, -1, pkey, ocerts)) { in PKCS12_parse() 93 if (pkey != NULL && *pkey ! in PKCS12_parse() 136 parse_pk12(PKCS12 *p12, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) parse_pk12() argument 184 parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen, EVP_PKEY **pkey, STACK_OF(X509) *ocerts) parse_bag() argument [all...] |
/third_party/openssl/demos/pkey/ |
H A D | EVP_PKEY_RSA_keygen.c | 38 EVP_PKEY *pkey = NULL; in generate_rsa_key_long() local 87 if (EVP_PKEY_generate(genctx, &pkey) <= 0) { in generate_rsa_key_long() 92 /* pkey is now set to an object representing the generated key pair. */ in generate_rsa_key_long() 96 return pkey; in generate_rsa_key_long() 110 EVP_PKEY *pkey = NULL; in generate_rsa_key_short() local 113 pkey = EVP_PKEY_Q_keygen(libctx, propq, "RSA", (size_t)bits); in generate_rsa_key_short() 115 if (pkey == NULL) in generate_rsa_key_short() 118 return pkey; in generate_rsa_key_short() 124 static int dump_key(const EVP_PKEY *pkey) in dump_key() argument 137 if (EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_ in dump_key() 244 EVP_PKEY *pkey = NULL; main() local [all...] |
/third_party/node/deps/openssl/openssl/crypto/ec/ |
H A D | ecx_meth.c | 31 static int ecx_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) in ecx_pub_encode() argument 33 const ECX_KEY *ecxkey = pkey->pkey.ecx; in ecx_pub_encode() 41 penc = OPENSSL_memdup(ecxkey->pubkey, KEYLEN(pkey)); in ecx_pub_encode() 47 if (!X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in ecx_pub_encode() 48 V_ASN1_UNDEF, NULL, penc, KEYLEN(pkey))) { in ecx_pub_encode() 56 static int ecx_pub_decode(EVP_PKEY *pkey, const X509_PUBKEY *pubkey) in ecx_pub_decode() argument 66 ecx = ossl_ecx_key_op(palg, p, pklen, pkey->ameth->pkey_id, in ecx_pub_decode() 70 EVP_PKEY_assign(pkey, pkey in ecx_pub_decode() 86 ecx_priv_decode_ex(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx, const char *propq) ecx_priv_decode_ex() argument 100 ecx_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) ecx_priv_encode() argument 132 ecx_size(const EVP_PKEY *pkey) ecx_size() argument 137 ecx_bits(const EVP_PKEY *pkey) ecx_bits() argument 148 ecx_security_bits(const EVP_PKEY *pkey) ecx_security_bits() argument 157 ecx_free(EVP_PKEY *pkey) ecx_free() argument 168 ecx_key_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx, ecx_key_op_t op) ecx_key_print() argument 205 ecx_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) ecx_priv_print() argument 211 ecx_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) ecx_pub_print() argument 217 ecx_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) ecx_ctrl() argument 247 ecd_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) ecd_ctrl() argument 261 ecx_set_priv_key(EVP_PKEY *pkey, const unsigned char *priv, size_t len) ecx_set_priv_key() argument 280 ecx_set_pub_key(EVP_PKEY *pkey, const unsigned char *pub, size_t len) ecx_set_pub_key() argument 298 ecx_get_priv_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len) ecx_get_priv_key() argument 319 ecx_get_pub_key(const EVP_PKEY *pkey, unsigned char *pub, size_t *len) ecx_get_pub_key() argument 339 ecx_pkey_dirty_cnt(const EVP_PKEY *pkey) ecx_pkey_dirty_cnt() argument 390 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); ecx_generic_import_from() local 532 ecd_size25519(const EVP_PKEY *pkey) ecd_size25519() argument 537 ecd_size448(const EVP_PKEY *pkey) ecd_size448() argument 542 ecd_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, const void *asn, const X509_ALGOR *sigalg, const ASN1_BIT_STRING *str, EVP_PKEY *pkey) ecd_item_verify() argument 712 pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) pkey_ecx_keygen() argument 936 s390x_pkey_ecx_keygen25519(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecx_keygen25519() argument 977 s390x_pkey_ecx_keygen448(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecx_keygen448() argument 1019 s390x_pkey_ecd_keygen25519(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecd_keygen25519() argument 1081 s390x_pkey_ecd_keygen448(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecd_keygen448() argument [all...] |
/third_party/openssl/crypto/ec/ |
H A D | ecx_meth.c | 31 static int ecx_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) in ecx_pub_encode() argument 33 const ECX_KEY *ecxkey = pkey->pkey.ecx; in ecx_pub_encode() 41 penc = OPENSSL_memdup(ecxkey->pubkey, KEYLEN(pkey)); in ecx_pub_encode() 47 if (!X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in ecx_pub_encode() 48 V_ASN1_UNDEF, NULL, penc, KEYLEN(pkey))) { in ecx_pub_encode() 56 static int ecx_pub_decode(EVP_PKEY *pkey, const X509_PUBKEY *pubkey) in ecx_pub_decode() argument 66 ecx = ossl_ecx_key_op(palg, p, pklen, pkey->ameth->pkey_id, in ecx_pub_decode() 70 EVP_PKEY_assign(pkey, pkey in ecx_pub_decode() 86 ecx_priv_decode_ex(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8, OSSL_LIB_CTX *libctx, const char *propq) ecx_priv_decode_ex() argument 100 ecx_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) ecx_priv_encode() argument 132 ecx_size(const EVP_PKEY *pkey) ecx_size() argument 137 ecx_bits(const EVP_PKEY *pkey) ecx_bits() argument 148 ecx_security_bits(const EVP_PKEY *pkey) ecx_security_bits() argument 157 ecx_free(EVP_PKEY *pkey) ecx_free() argument 168 ecx_key_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx, ecx_key_op_t op) ecx_key_print() argument 205 ecx_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) ecx_priv_print() argument 211 ecx_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) ecx_pub_print() argument 217 ecx_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) ecx_ctrl() argument 247 ecd_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) ecd_ctrl() argument 261 ecx_set_priv_key(EVP_PKEY *pkey, const unsigned char *priv, size_t len) ecx_set_priv_key() argument 280 ecx_set_pub_key(EVP_PKEY *pkey, const unsigned char *pub, size_t len) ecx_set_pub_key() argument 298 ecx_get_priv_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len) ecx_get_priv_key() argument 319 ecx_get_pub_key(const EVP_PKEY *pkey, unsigned char *pub, size_t *len) ecx_get_pub_key() argument 339 ecx_pkey_dirty_cnt(const EVP_PKEY *pkey) ecx_pkey_dirty_cnt() argument 390 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); ecx_generic_import_from() local 532 ecd_size25519(const EVP_PKEY *pkey) ecd_size25519() argument 537 ecd_size448(const EVP_PKEY *pkey) ecd_size448() argument 542 ecd_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, const void *asn, const X509_ALGOR *sigalg, const ASN1_BIT_STRING *str, EVP_PKEY *pkey) ecd_item_verify() argument 712 pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) pkey_ecx_keygen() argument 936 s390x_pkey_ecx_keygen25519(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecx_keygen25519() argument 977 s390x_pkey_ecx_keygen448(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecx_keygen448() argument 1019 s390x_pkey_ecd_keygen25519(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecd_keygen25519() argument 1081 s390x_pkey_ecd_keygen448(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) s390x_pkey_ecd_keygen448() argument [all...] |
/third_party/node/deps/openssl/openssl/crypto/rsa/ |
H A D | rsa_ameth.c | 28 /* Set any parameters associated with pkey */ 29 static int rsa_param_encode(const EVP_PKEY *pkey, in rsa_param_encode() argument 32 const RSA *rsa = pkey->pkey.rsa; in rsa_param_encode() 53 static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) in rsa_pub_encode() argument 60 if (!rsa_param_encode(pkey, &str, &strtype)) in rsa_pub_encode() 62 penclen = i2d_RSAPublicKey(pkey->pkey.rsa, &penc); in rsa_pub_encode() 67 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in rsa_pub_encode() 76 static int rsa_pub_decode(EVP_PKEY *pkey, cons argument 129 old_rsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) old_rsa_priv_decode() argument 140 old_rsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) old_rsa_priv_encode() argument 145 rsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) rsa_priv_encode() argument 173 rsa_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) rsa_priv_decode() argument 185 int_rsa_size(const EVP_PKEY *pkey) int_rsa_size() argument 190 rsa_bits(const EVP_PKEY *pkey) rsa_bits() argument 195 rsa_security_bits(const EVP_PKEY *pkey) rsa_security_bits() argument 200 int_rsa_free(EVP_PKEY *pkey) int_rsa_free() argument 300 pkey_rsa_print(BIO *bp, const EVP_PKEY *pkey, int off, int priv) pkey_rsa_print() argument 389 rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) rsa_pub_print() argument 395 rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) rsa_priv_print() argument 420 rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) rsa_pkey_ctrl() argument 523 ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx, const X509_ALGOR *sigalg, EVP_PKEY *pkey) ossl_rsa_pss_to_ctx() argument 615 rsa_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, const void *asn, const X509_ALGOR *sigalg, const ASN1_BIT_STRING *sig, EVP_PKEY *pkey) rsa_item_verify() argument 758 rsa_pkey_check(const EVP_PKEY *pkey) rsa_pkey_check() argument 763 rsa_pkey_dirty_cnt(const EVP_PKEY *pkey) rsa_pkey_dirty_cnt() argument 832 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); rsa_int_import_from() local [all...] |
/third_party/openssl/crypto/rsa/ |
H A D | rsa_ameth.c | 28 /* Set any parameters associated with pkey */ 29 static int rsa_param_encode(const EVP_PKEY *pkey, in rsa_param_encode() argument 32 const RSA *rsa = pkey->pkey.rsa; in rsa_param_encode() 53 static int rsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) in rsa_pub_encode() argument 60 if (!rsa_param_encode(pkey, &str, &strtype)) in rsa_pub_encode() 62 penclen = i2d_RSAPublicKey(pkey->pkey.rsa, &penc); in rsa_pub_encode() 65 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id), in rsa_pub_encode() 73 static int rsa_pub_decode(EVP_PKEY *pkey, cons argument 126 old_rsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) old_rsa_priv_decode() argument 137 old_rsa_priv_encode(const EVP_PKEY *pkey, unsigned char **pder) old_rsa_priv_encode() argument 142 rsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) rsa_priv_encode() argument 170 rsa_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) rsa_priv_decode() argument 182 int_rsa_size(const EVP_PKEY *pkey) int_rsa_size() argument 187 rsa_bits(const EVP_PKEY *pkey) rsa_bits() argument 192 rsa_security_bits(const EVP_PKEY *pkey) rsa_security_bits() argument 197 int_rsa_free(EVP_PKEY *pkey) int_rsa_free() argument 297 pkey_rsa_print(BIO *bp, const EVP_PKEY *pkey, int off, int priv) pkey_rsa_print() argument 386 rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) rsa_pub_print() argument 392 rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) rsa_priv_print() argument 417 rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) rsa_pkey_ctrl() argument 520 ossl_rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx, const X509_ALGOR *sigalg, EVP_PKEY *pkey) ossl_rsa_pss_to_ctx() argument 612 rsa_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, const void *asn, const X509_ALGOR *sigalg, const ASN1_BIT_STRING *sig, EVP_PKEY *pkey) rsa_item_verify() argument 723 rsa_pkey_check(const EVP_PKEY *pkey) rsa_pkey_check() argument 728 rsa_pkey_dirty_cnt(const EVP_PKEY *pkey) rsa_pkey_dirty_cnt() argument 797 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(pctx); rsa_int_import_from() local [all...] |
/third_party/node/deps/openssl/openssl/crypto/engine/ |
H A D | eng_pkey.c | 59 EVP_PKEY *pkey; in ENGINE_load_private_key() local 77 pkey = e->load_privkey(e, key_id, ui_method, callback_data); in ENGINE_load_private_key() 78 if (pkey == NULL) { in ENGINE_load_private_key() 83 switch (EVP_PKEY_get_id(pkey)) { in ENGINE_load_private_key() 86 RSA *rsa = EVP_PKEY_get1_RSA(pkey); in ENGINE_load_private_key() 87 EVP_PKEY_set1_RSA(pkey, rsa); in ENGINE_load_private_key() 95 EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); in ENGINE_load_private_key() 96 EVP_PKEY_set1_EC_KEY(pkey, ec); in ENGINE_load_private_key() 104 DSA *dsa = EVP_PKEY_get1_DSA(pkey); in ENGINE_load_private_key() 105 EVP_PKEY_set1_DSA(pkey, ds in ENGINE_load_private_key() 130 EVP_PKEY *pkey; ENGINE_load_public_key() local [all...] |
/third_party/node/deps/openssl/openssl/crypto/evp/ |
H A D | evp_pkey.c | 27 EVP_PKEY *pkey = NULL; in evp_pkcs82pkey_legacy() local 34 if ((pkey = EVP_PKEY_new()) == NULL) { in evp_pkcs82pkey_legacy() 39 if (!EVP_PKEY_set_type(pkey, OBJ_obj2nid(algoid))) { in evp_pkcs82pkey_legacy() 46 if (pkey->ameth->priv_decode_ex != NULL) { in evp_pkcs82pkey_legacy() 47 if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) in evp_pkcs82pkey_legacy() 49 } else if (pkey->ameth->priv_decode != NULL) { in evp_pkcs82pkey_legacy() 50 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy() 59 return pkey; in evp_pkcs82pkey_legacy() 69 EVP_PKEY *pkey = NULL; EVP_PKCS82PKEY_ex() local 103 EVP_PKEY2PKCS8(const EVP_PKEY *pkey) EVP_PKEY2PKCS8() argument [all...] |
/third_party/openssl/crypto/evp/ |
H A D | evp_pkey.c | 27 EVP_PKEY *pkey = NULL; in evp_pkcs82pkey_legacy() local 34 if ((pkey = EVP_PKEY_new()) == NULL) { in evp_pkcs82pkey_legacy() 39 if (!EVP_PKEY_set_type(pkey, OBJ_obj2nid(algoid))) { in evp_pkcs82pkey_legacy() 46 if (pkey->ameth->priv_decode_ex != NULL) { in evp_pkcs82pkey_legacy() 47 if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) in evp_pkcs82pkey_legacy() 49 } else if (pkey->ameth->priv_decode != NULL) { in evp_pkcs82pkey_legacy() 50 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy() 59 return pkey; in evp_pkcs82pkey_legacy() 69 EVP_PKEY *pkey = NULL; EVP_PKCS82PKEY_ex() local 103 EVP_PKEY2PKCS8(const EVP_PKEY *pkey) EVP_PKEY2PKCS8() argument [all...] |
/kernel/linux/linux-5.10/drivers/infiniband/core/ |
H A D | security.c | 48 struct pkey_index_qp_list *pkey = NULL; in get_pkey_idx_qp_list() local 56 pkey = tmp_pkey; in get_pkey_idx_qp_list() 61 return pkey; in get_pkey_idx_qp_list() 65 u16 *pkey, in get_pkey_and_subnet_prefix() 71 ret = ib_get_cached_pkey(dev, pp->port_num, pp->pkey_index, pkey); in get_pkey_and_subnet_prefix() 80 static int enforce_qp_pkey_security(u16 pkey, in enforce_qp_pkey_security() argument 87 ret = security_ib_pkey_access(qp_sec->security, subnet_prefix, pkey); in enforce_qp_pkey_security() 96 pkey); in enforce_qp_pkey_security() 115 u16 pkey; in check_qp_port_pkey_settings() local 123 &pkey, in check_qp_port_pkey_settings() 64 get_pkey_and_subnet_prefix(struct ib_port_pkey *pp, u16 *pkey, u64 *subnet_prefix) get_pkey_and_subnet_prefix() argument 194 check_pkey_qps(struct pkey_index_qp_list *pkey, struct ib_device *device, u8 port_num, u64 subnet_prefix) check_pkey_qps() argument 246 struct pkey_index_qp_list *pkey; port_pkey_list_insert() local 304 struct pkey_index_qp_list *pkey; port_pkey_list_remove() local 544 struct pkey_index_qp_list *pkey; ib_security_cache_change() local 557 struct pkey_index_qp_list *pkey, *tmp_pkey; ib_security_release_port_pkey_list() local 657 u16 pkey; ib_security_pkey_access() local [all...] |
/kernel/linux/linux-6.6/drivers/infiniband/core/ |
H A D | security.c | 48 struct pkey_index_qp_list *pkey = NULL; in get_pkey_idx_qp_list() local 56 pkey = tmp_pkey; in get_pkey_idx_qp_list() 61 return pkey; in get_pkey_idx_qp_list() 65 u16 *pkey, in get_pkey_and_subnet_prefix() 71 ret = ib_get_cached_pkey(dev, pp->port_num, pp->pkey_index, pkey); in get_pkey_and_subnet_prefix() 80 static int enforce_qp_pkey_security(u16 pkey, in enforce_qp_pkey_security() argument 87 ret = security_ib_pkey_access(qp_sec->security, subnet_prefix, pkey); in enforce_qp_pkey_security() 96 pkey); in enforce_qp_pkey_security() 115 u16 pkey; in check_qp_port_pkey_settings() local 123 &pkey, in check_qp_port_pkey_settings() 64 get_pkey_and_subnet_prefix(struct ib_port_pkey *pp, u16 *pkey, u64 *subnet_prefix) get_pkey_and_subnet_prefix() argument 194 check_pkey_qps(struct pkey_index_qp_list *pkey, struct ib_device *device, u32 port_num, u64 subnet_prefix) check_pkey_qps() argument 246 struct pkey_index_qp_list *pkey; port_pkey_list_insert() local 304 struct pkey_index_qp_list *pkey; port_pkey_list_remove() local 544 struct pkey_index_qp_list *pkey; ib_security_cache_change() local 557 struct pkey_index_qp_list *pkey, *tmp_pkey; ib_security_release_port_pkey_list() local 657 u16 pkey; ib_security_pkey_access() local [all...] |
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
H A D | openssl_dsa_helper.c | 46 EVP_PKEY *pkey = EVP_PKEY_new(); in GenerateDsaKey() local 47 if (pkey == NULL) { in GenerateDsaKey() 52 if (EVP_PKEY_assign_DSA(pkey, dsa) != 1) { in GenerateDsaKey() 53 EVP_PKEY_free(pkey); in GenerateDsaKey() 58 return pkey; in GenerateDsaKey() 163 EVP_PKEY *pkey = EVP_PKEY_new(); in OpensslSignDsa() local 164 if (pkey == NULL) { in OpensslSignDsa() 169 if (EVP_PKEY_assign_DSA(pkey, dsaTest) != 1) { in OpensslSignDsa() 170 EVP_PKEY_free(pkey); in OpensslSignDsa() 177 EVP_PKEY_free(pkey); in OpensslSignDsa() 217 EVP_PKEY *pkey = EVP_PKEY_new(); OpensslVerifyDsa() local 264 EVP_PKEY *pkey = d2i_PUBKEY(NULL, (const unsigned char **)&data, x509Key->size); X509ToDsaPublicKey() local 318 DsaGetx509PubKey(EVP_PKEY *pkey, struct HksBlob *x509Key) DsaGetx509PubKey() argument 340 SaveDsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key) SaveDsaKeyToHksBlob() argument [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/mm/ |
H A D | pkey_exec_prot.c | 69 sigsafe_err("got a fault for an unexpected pkey\n"); in segv_handler() 79 * Reassociate the exec-only pkey with the region in segv_handler() 106 int pkey, ret, i; in test() local 153 /* Allocate a pkey that restricts execution */ in test() 155 pkey = sys_pkey_alloc(0, rights); in test() 156 FAIL_IF(pkey < 0); in test() 170 * are not set i.e. the pkey permits both read and write in test() 174 * implies PROT_READ on GNU systems. The pkey currently in test() 179 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 180 printf("read from %p, pkey permission in test() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/mm/ |
H A D | pkey_exec_prot.c | 69 sigsafe_err("got a fault for an unexpected pkey\n"); in segv_handler() 79 * Reassociate the exec-only pkey with the region in segv_handler() 106 int pkey, ret, i; in test() local 153 /* Allocate a pkey that restricts execution */ in test() 155 pkey = sys_pkey_alloc(0, rights); in test() 156 FAIL_IF(pkey < 0); in test() 170 * are not set i.e. the pkey permits both read and write in test() 174 * implies PROT_READ on GNU systems. The pkey currently in test() 179 FAIL_IF(sys_pkey_mprotect(insns, pgsize, PROT_EXEC, pkey) != 0); in test() 180 printf("read from %p, pkey permission in test() [all...] |
/third_party/node/deps/openssl/openssl/crypto/asn1/ |
H A D | a_verify.c | 28 char *data, EVP_PKEY *pkey) in ASN1_verify() 76 (unsigned int)signature->length, pkey) <= 0) { in ASN1_verify() 91 EVP_PKEY *pkey) in ASN1_item_verify() 93 return ASN1_item_verify_ex(it, alg, signature, data, NULL, pkey, NULL, NULL); in ASN1_item_verify() 98 const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, in ASN1_item_verify_ex() 104 if ((ctx = evp_md_ctx_new_ex(pkey, id, libctx, propq)) != NULL) { in ASN1_item_verify_ex() 116 EVP_PKEY *pkey; in ASN1_item_verify_ctx() local 122 pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx)); in ASN1_item_verify_ctx() 124 if (pkey == NULL) { in ASN1_item_verify_ctx() 140 if (mdnid == NID_undef && evp_pkey_is_legacy(pkey)) { in ASN1_item_verify_ctx() 27 ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey) ASN1_verify() argument 89 ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg, const ASN1_BIT_STRING *signature, const void *data, EVP_PKEY *pkey) ASN1_item_verify() argument 96 ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg, const ASN1_BIT_STRING *signature, const void *data, const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, const char *propq) ASN1_item_verify_ex() argument [all...] |
/third_party/openssl/crypto/asn1/ |
H A D | a_verify.c | 28 char *data, EVP_PKEY *pkey) in ASN1_verify() 76 (unsigned int)signature->length, pkey) <= 0) { in ASN1_verify() 91 EVP_PKEY *pkey) in ASN1_item_verify() 93 return ASN1_item_verify_ex(it, alg, signature, data, NULL, pkey, NULL, NULL); in ASN1_item_verify() 98 const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, in ASN1_item_verify_ex() 104 if ((ctx = evp_md_ctx_new_ex(pkey, id, libctx, propq)) != NULL) { in ASN1_item_verify_ex() 116 EVP_PKEY *pkey; in ASN1_item_verify_ctx() local 122 pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx)); in ASN1_item_verify_ctx() 124 if (pkey == NULL) { in ASN1_item_verify_ctx() 140 if (mdnid == NID_undef && evp_pkey_is_legacy(pkey)) { in ASN1_item_verify_ctx() 27 ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey) ASN1_verify() argument 89 ASN1_item_verify(const ASN1_ITEM *it, const X509_ALGOR *alg, const ASN1_BIT_STRING *signature, const void *data, EVP_PKEY *pkey) ASN1_item_verify() argument 96 ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg, const ASN1_BIT_STRING *signature, const void *data, const ASN1_OCTET_STRING *id, EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, const char *propq) ASN1_item_verify_ex() argument [all...] |
/kernel/linux/linux-5.10/drivers/infiniband/ulp/ipoib/ |
H A D | ipoib_vlan.c | 61 * Since the legacy sysfs interface uses pkey for deletion it cannot in is_child_unique() 62 * support more than one interface with the same pkey, it creates in is_child_unique() 74 if (ppriv->pkey == priv->pkey) in is_child_unique() 78 if (tpriv->pkey == priv->pkey && in is_child_unique() 96 u16 pkey, int type) in __ipoib_vlan_add() 116 if (pkey == 0 || pkey == 0x8000) { in __ipoib_vlan_add() 124 priv->pkey in __ipoib_vlan_add() 95 __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, u16 pkey, int type) __ipoib_vlan_add() argument 168 ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) ipoib_vlan_add() argument 248 ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey) ipoib_vlan_delete() argument [all...] |
/kernel/linux/linux-6.6/drivers/infiniband/ulp/ipoib/ |
H A D | ipoib_vlan.c | 60 * Since the legacy sysfs interface uses pkey for deletion it cannot in is_child_unique() 61 * support more than one interface with the same pkey, it creates in is_child_unique() 73 if (ppriv->pkey == priv->pkey) in is_child_unique() 77 if (tpriv->pkey == priv->pkey && in is_child_unique() 95 u16 pkey, int type) in __ipoib_vlan_add() 115 if (pkey == 0 || pkey == 0x8000) { in __ipoib_vlan_add() 123 priv->pkey in __ipoib_vlan_add() 94 __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, u16 pkey, int type) __ipoib_vlan_add() argument 167 ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) ipoib_vlan_add() argument 247 ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey) ipoib_vlan_delete() argument [all...] |
/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() argument 56 int32_t length = i2d_PUBKEY(pkey, NULL);
in EvpKeyToX509Format() 68 if ((uint32_t)i2d_PUBKEY(pkey, &tmp) != keyLength) {
in EvpKeyToX509Format() 85 EVP_PKEY *pkey = NULL;
in RsaToX509PublicKey() local 104 pkey = EVP_PKEY_new();
in RsaToX509PublicKey() 105 HKS_IF_NULL_LOGE_BREAK(pkey, "pkey is null")
in RsaToX509PublicKey() 106 if (EVP_PKEY_set1_RSA(pkey, rsa) == 0) {
in RsaToX509PublicKey() 110 result = EvpKeyToX509Format(pkey, x509Key);
in RsaToX509PublicKey() 116 SELF_FREE_PTR(pkey, EVP_PKEY_fre in RsaToX509PublicKey() 158 EVP_PKEY *pkey = NULL; EccToX509PublicKey() local 246 EVP_PKEY *pkey = NULL; DsaToX509PublicKey() local 330 EVP_PKEY *pkey = NULL; DhToX509PublicKey() local 451 X509PublicKeyToRsa(EVP_PKEY *pkey, struct HksBlob *rsaPublicKey) X509PublicKeyToRsa() argument 544 X509PublicKeyToEcc(const uint32_t alg, EVP_PKEY *pkey, struct HksBlob *eccPublicKey) X509PublicKeyToEcc() argument 555 EvpPkeyToHksPubKeyInfo( const uint32_t alg, uint32_t keyLen, const EVP_PKEY *pkey, struct HksBlob *sm2PublicKey) EvpPkeyToHksPubKeyInfo() argument 601 X509PublicKeyToSm2(const uint32_t alg, EVP_PKEY *pkey, struct HksBlob *sm2PublicKey) X509PublicKeyToSm2() argument 637 X509PublicKeyToDsa(EVP_PKEY *pkey, struct HksBlob *dsaPublicKey) X509PublicKeyToDsa() argument 694 X509PublicKeyToDh(EVP_PKEY *pkey, struct HksBlob *dhPublicKey) X509PublicKeyToDh() argument 738 EVP_PKEY *pkey = d2i_PUBKEY(NULL, (const unsigned char **)&data, x509Key->size); TranslateFromX509PublicKey() local [all...] |
/third_party/rust/crates/rust-openssl/openssl/src/ |
H A D | pkcs12.rs | 12 use crate::pkey::{HasPrivate, PKey, PKeyRef, Private}; 42 pkey: parsed.pkey.unwrap(), in parse() 54 let mut pkey = ptr::null_mut(); in parse2() variables 61 &mut pkey, in parse2() 66 let pkey = PKey::from_ptr_opt(pkey); in parse2() 70 Ok(ParsedPkcs12_2 { pkey, cert, ca }) in parse2() 98 pkey: None, in builder() 113 pub pkey 147 pub fn pkey<T>(&mut self, pkey: &PKeyRef<T>) -> &mut Self pkey() functions [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/include/ |
H A D | pkeys.h | 52 void pkey_set_rights(int pkey, unsigned long rights) in pkey_set_rights() argument 56 shift = (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; in pkey_set_rights() 63 int sys_pkey_mprotect(void *addr, size_t len, int prot, int pkey) in sys_pkey_mprotect() argument 65 return syscall(__NR_pkey_mprotect, addr, len, prot, pkey); in sys_pkey_mprotect() 73 int sys_pkey_free(int pkey) in sys_pkey_free() argument 75 return syscall(__NR_pkey_free, pkey); in sys_pkey_free() 81 int pkey; in pkeys_unsupported() local 88 pkey = sys_pkey_alloc(0, 0); in pkeys_unsupported() 89 SKIP_IF(pkey < 0); in pkeys_unsupported() 90 sys_pkey_free(pkey); in pkeys_unsupported() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/include/ |
H A D | pkeys.h | 52 void pkey_set_rights(int pkey, unsigned long rights) in pkey_set_rights() argument 56 shift = (NR_PKEYS - pkey - 1) * PKEY_BITS_PER_PKEY; in pkey_set_rights() 63 int sys_pkey_mprotect(void *addr, size_t len, int prot, int pkey) in sys_pkey_mprotect() argument 65 return syscall(__NR_pkey_mprotect, addr, len, prot, pkey); in sys_pkey_mprotect() 73 int sys_pkey_free(int pkey) in sys_pkey_free() argument 75 return syscall(__NR_pkey_free, pkey); in sys_pkey_free() 81 int pkey; in pkeys_unsupported() local 88 pkey = sys_pkey_alloc(0, 0); in pkeys_unsupported() 89 SKIP_IF(pkey < 0); in pkeys_unsupported() 90 sys_pkey_free(pkey); in pkeys_unsupported() [all...] |