/external/boringssl/src/crypto/evp/ |
H A D | evp.c | 90 static void free_it(EVP_PKEY *pkey) { argument 91 if (pkey->ameth && pkey->ameth->pkey_free) { 92 pkey->ameth->pkey_free(pkey); 93 pkey->pkey.ptr = NULL; 94 pkey->type = EVP_PKEY_NONE; 98 void EVP_PKEY_free(EVP_PKEY *pkey) { argument 99 if (pkey 111 EVP_PKEY_up_ref(EVP_PKEY *pkey) argument 116 EVP_PKEY_is_opaque(const EVP_PKEY *pkey) argument 165 EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) argument 172 EVP_PKEY_size(const EVP_PKEY *pkey) argument 179 EVP_PKEY_bits(EVP_PKEY *pkey) argument 186 EVP_PKEY_id(const EVP_PKEY *pkey) argument 216 EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) argument 224 EVP_PKEY_assign_RSA(EVP_PKEY *pkey, RSA *key) argument 228 EVP_PKEY_get0_RSA(EVP_PKEY *pkey) argument 236 EVP_PKEY_get1_RSA(EVP_PKEY *pkey) argument 244 EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) argument 252 EVP_PKEY_assign_DSA(EVP_PKEY *pkey, DSA *key) argument 256 EVP_PKEY_get0_DSA(EVP_PKEY *pkey) argument 264 EVP_PKEY_get1_DSA(EVP_PKEY *pkey) argument 272 EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) argument 280 EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) argument 284 EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey) argument 292 EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) argument 300 EVP_PKEY_get0_DH(EVP_PKEY *pkey) argument 302 EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) argument 310 EVP_PKEY_set_type(EVP_PKEY *pkey, int type) argument [all...] |
H A D | p_ed25519_asn1.c | 26 static void ed25519_free(EVP_PKEY *pkey) { argument 27 OPENSSL_free(pkey->pkey.ptr); 28 pkey->pkey.ptr = NULL; 31 static int set_pubkey(EVP_PKEY *pkey, const uint8_t pubkey[32]) { argument 40 ed25519_free(pkey); 41 pkey->pkey.ptr = key; 45 static int set_privkey(EVP_PKEY *pkey, cons argument 72 ed25519_pub_encode(CBB *out, const EVP_PKEY *pkey) argument 119 ed25519_priv_encode(CBB *out, const EVP_PKEY *pkey) argument 146 ed25519_size(const EVP_PKEY *pkey) argument 148 ed25519_bits(const EVP_PKEY *pkey) argument [all...] |
H A D | p_rsa_asn1.c | 79 !RSA_marshal_public_key(&key_bitstring, key->pkey.rsa) || 112 return BN_cmp(b->pkey.rsa->n, a->pkey.rsa->n) == 0 && 113 BN_cmp(b->pkey.rsa->e, a->pkey.rsa->e) == 0; 125 !RSA_marshal_private_key(&private_key, key->pkey.rsa) || 155 static int rsa_opaque(const EVP_PKEY *pkey) { argument 156 return RSA_is_opaque(pkey->pkey.rsa); 159 static int int_rsa_size(const EVP_PKEY *pkey) { argument 163 rsa_bits(const EVP_PKEY *pkey) argument 167 int_rsa_free(EVP_PKEY *pkey) argument [all...] |
H A D | p_dsa_asn1.c | 105 const DSA *dsa = key->pkey.dsa; 170 const DSA *dsa = key->pkey.dsa; 194 static int int_dsa_size(const EVP_PKEY *pkey) { argument 195 return DSA_size(pkey->pkey.dsa); 198 static int dsa_bits(const EVP_PKEY *pkey) { argument 199 return BN_num_bits(pkey->pkey.dsa->p); 202 static int dsa_missing_parameters(const EVP_PKEY *pkey) { argument 204 dsa = pkey 244 int_dsa_free(EVP_PKEY *pkey) argument [all...] |
H A D | p_ec_asn1.c | 69 const EC_KEY *ec_key = key->pkey.ec; 130 const EC_GROUP *group = EC_KEY_get0_group(b->pkey.ec); 131 const EC_POINT *pa = EC_KEY_get0_public_key(a->pkey.ec), 132 *pb = EC_KEY_get0_public_key(b->pkey.ec); 165 const EC_KEY *ec_key = key->pkey.ec; 191 static int int_ec_size(const EVP_PKEY *pkey) { argument 192 return ECDSA_size(pkey->pkey.ec); 195 static int ec_bits(const EVP_PKEY *pkey) { argument 196 const EC_GROUP *group = EC_KEY_get0_group(pkey 204 ec_missing_parameters(const EVP_PKEY *pkey) argument 228 int_ec_free(EVP_PKEY *pkey) argument 230 eckey_opaque(const EVP_PKEY *pkey) argument [all...] |
H A D | print.c | 204 static int rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, argument 206 return do_rsa_print(bp, pkey->pkey.rsa, indent, 0); 209 static int rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, argument 211 return do_rsa_print(bp, pkey->pkey.rsa, indent, 1); 275 static int dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, argument 277 return do_dsa_print(bp, pkey->pkey.dsa, indent, 0); 280 static int dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, in argument 285 dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 399 eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 404 eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 410 eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx) argument 457 print_unsupported(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr) argument 464 EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument 473 EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument 482 EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) argument [all...] |
H A D | p_ec.c | 120 EC_KEY *ec = ctx->pkey->pkey.ec; 139 return ECDSA_verify(0, tbs, tbslen, sig, siglen, ctx->pkey->pkey.ec); 149 if (!ctx->pkey || !ctx->peerkey) { 154 eckey = ctx->pkey->pkey.ec; 162 pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec); 208 static int pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) { argument 209 if (ctx->pkey [all...] |
H A D | p_ed25519.c | 29 ED25519_KEY *key = ctx->pkey->pkey.ptr; 46 ED25519_KEY *key = ctx->pkey->pkey.ptr;
|
/external/google-tv-pairing-protocol/cpp/tests/polo/util/ |
H A D | certificateutiltest.cc | 54 EVP_PKEY* pkey = EVP_PKEY_new(); local 76 EVP_PKEY_assign_RSA(pkey, rsa); 82 X509_set_pubkey(x509, pkey); 92 X509_sign(x509, pkey, EVP_sha256()); 97 EVP_PKEY_free(pkey); 135 EVP_PKEY* pkey = CertificateUtil::PKEYFromPEM(pem, "testing"); local 137 ASSERT_TRUE(pkey); 139 RSA* rsa = EVP_PKEY_get1_RSA(pkey); 142 EVP_PKEY_free(pkey); 147 EVP_PKEY* pkey local 166 EVP_PKEY* pkey = CertificateUtil::GeneratePrivateKey(); local 173 EVP_PKEY* pkey = CertificateUtil::GeneratePrivateKey(); local [all...] |
/external/vboot_reference/firmware/lib21/ |
H A D | packed_key.c | 49 const struct vb2_packed_key *pkey = local 56 if (pkey->c.magic != VB2_MAGIC_PACKED_KEY) 64 rv = vb2_verify_common_member(pkey, &min_offset, 65 pkey->key_offset, pkey->key_size); 74 if (pkey->c.struct_version_major != VB2_PACKED_KEY_VERSION_MAJOR) 78 key->hash_alg = pkey->hash_alg; 82 key->sig_alg = pkey->sig_alg; 89 (const uint8_t *)pkey + pkey [all...] |
/external/boringssl/src/crypto/x509/ |
H A D | algorithm.c | 69 EVP_PKEY *pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx); local 70 if (pkey == NULL) { 75 if (EVP_PKEY_id(pkey) == EVP_PKEY_RSA) { 86 if (EVP_PKEY_id(pkey) == EVP_PKEY_ED25519) { 100 EVP_PKEY_id(pkey))) { 108 (EVP_PKEY_id(pkey) == EVP_PKEY_RSA) ? V_ASN1_NULL : V_ASN1_UNDEF; 114 EVP_PKEY *pkey) { 124 if (pkey_nid != EVP_PKEY_id(pkey)) { 132 return x509_rsa_pss_to_ctx(ctx, sigalg, pkey); 139 return EVP_DigestVerifyInit(ctx, NULL, NULL, NULL, pkey); 113 x509_digest_verify_init(EVP_MD_CTX *ctx, X509_ALGOR *sigalg, EVP_PKEY *pkey) argument [all...] |
H A D | i2d_pr.c | 70 return i2d_RSAPrivateKey(a->pkey.rsa, pp); 72 return i2d_ECPrivateKey(a->pkey.ec, pp); 74 return i2d_DSAPrivateKey(a->pkey.dsa, pp);
|
H A D | x_pubkey.c | 78 EVP_PKEY_free(pubkey->pkey); 90 int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) 101 !EVP_marshal_public_key(&cbb, pkey) || 127 /* g_pubkey_lock is used to protect the initialisation of the |pkey| member of 142 if (key->pkey != NULL) { 144 EVP_PKEY_up_ref(key->pkey); 145 return key->pkey; 162 /* Check to see if another thread set key->pkey first */ 164 if (key->pkey) { 167 ret = key->pkey; 224 EVP_PKEY *pkey; local 263 EVP_PKEY *pkey; local 302 EVP_PKEY *pkey; local [all...] |
H A D | x509.c | 93 ASN1_TYPE_set(priv->pkey, pmtype, oct); 113 if (p8->pkey->type == V_ASN1_OCTET_STRING) { 116 *pk = p8->pkey->value.octet_string->data; 117 *ppklen = p8->pkey->value.octet_string->length; 119 } else if (p8->pkey->type == V_ASN1_SEQUENCE) { 122 *pk = p8->pkey->value.sequence->data; 123 *ppklen = p8->pkey->value.sequence->length;
|
H A D | internal.h | 31 * |NID_rsassaPss|) and key |pkey|. It returns one on success and zero on 33 int x509_rsa_pss_to_ctx(EVP_MD_CTX *ctx, X509_ALGOR *sigalg, EVP_PKEY *pkey); 55 * with public key |pkey| and parameters from |algor|. The |ctx| argument must 59 EVP_PKEY *pkey);
|
H A D | x509rset.c | 76 int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey) argument 80 return (X509_PUBKEY_set(&x->req_info->pubkey, pkey));
|
H A D | a_sign.c | 69 EVP_PKEY *pkey, const EVP_MD *type) 73 if (!EVP_DigestSignInit(&ctx, NULL, type, NULL, pkey)) { 84 EVP_PKEY *pkey; local 88 pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx); 99 outl = EVP_PKEY_size(pkey); 67 ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey, const EVP_MD *type) argument
|
/external/linux-kselftest/tools/testing/selftests/x86/ |
H A D | protection_keys.c | 8 * * how to handle SEGV_PKRU signals and extract pkey-relevant 17 * look for pkey "leaks" where it is still set on a VMA but "freed" back to the kernel 18 * do a plain mprotect() to a mprotect_pkey() area and make sure the pkey sticks 46 #include "pkey-helpers.h" 309 dprintf1("pkey from siginfo: %jx\n", siginfo_pkey); 427 u32 pkey_get(int pkey, unsigned long flags) argument 434 dprintf1("%s(pkey=%d, flags=%lx) = %x / %d\n", 435 __func__, pkey, flags, 0, 0); 438 shifted_pkru = (pkru >> (pkey * PKRU_BITS_PER_PKEY)); 449 int pkey_set(int pkey, unsigne argument 472 pkey_disable_set(int pkey, int flags) argument 510 pkey_disable_clear(int pkey, int flags) argument 539 pkey_write_allow(int pkey) argument 543 pkey_write_deny(int pkey) argument 547 pkey_access_allow(int pkey) argument 551 pkey_access_deny(int pkey) argument 556 sys_mprotect_pkey(void *ptr, size_t size, unsigned long orig_prot, unsigned long pkey) argument 619 sys_pkey_free(unsigned long pkey) argument 671 mprotect_pkey(void *ptr, size_t size, unsigned long orig_prot, unsigned long pkey) argument 771 malloc_pkey_with_mprotect(long size, int prot, u16 pkey) argument 791 malloc_pkey_anon_huge(long size, int prot, u16 pkey) argument 863 malloc_pkey_hugetlb(long size, int prot, u16 pkey) argument 884 malloc_pkey_mmap_dax(long size, int prot, u16 pkey) argument 918 malloc_pkey(long size, int prot, u16 pkey) argument 949 expected_pk_fault(int pkey) argument 1015 test_read_of_write_disabled_region(int *ptr, u16 pkey) argument 1025 test_read_of_access_disabled_region(int *ptr, u16 pkey) argument 1036 test_write_of_write_disabled_region(int *ptr, u16 pkey) argument 1043 test_write_of_access_disabled_region(int *ptr, u16 pkey) argument 1050 test_kernel_write_of_access_disabled_region(int *ptr, u16 pkey) argument 1062 test_kernel_write_of_write_disabled_region(int *ptr, u16 pkey) argument 1075 test_kernel_gup_of_access_disabled_region(int *ptr, u16 pkey) argument 1097 test_kernel_gup_write_to_write_disabled_region(int *ptr, u16 pkey) argument 1115 test_pkey_syscalls_on_non_allocated_pkey(int *ptr, u16 pkey) argument 1138 test_pkey_syscalls_bad_args(int *ptr, u16 pkey) argument 1149 test_pkey_alloc_exhaust(int *ptr, u16 pkey) argument 1196 test_ptrace_of_child(int *ptr, u16 pkey) argument 1272 test_executing_on_unreadable_memory(int *ptr, u16 pkey) argument 1309 test_mprotect_pkey_on_unsupported_cpu(int *ptr, u16 pkey) argument 1345 int pkey; local [all...] |
/external/google-tv-pairing-protocol/cpp/src/polo/util/ |
H A D | certificateutil.cc | 57 EVP_PKEY* pkey = PEM_read_bio_PrivateKey(bio, NULL, 0, &passphrase[0]); local 60 return pkey; 63 std::string CertificateUtil::PKEYToPEM(EVP_PKEY* pkey, argument 66 PEM_write_bio_PrivateKey(bio, pkey, EVP_des_ede3_cbc(), NULL, 0, 0, 80 EVP_PKEY* pkey = EVP_PKEY_new(); local 82 EVP_PKEY_assign_RSA(pkey, rsa); 83 return pkey; 86 X509* CertificateUtil::GenerateSelfSignedCert(EVP_PKEY* pkey, argument 94 X509_set_pubkey(x509, pkey); 101 X509_sign(x509, pkey, EVP_sha25 [all...] |
H A D | certificateutil.h | 50 // @param pkey the private key 53 static std::string PKEYToPEM(EVP_PKEY* pkey, 61 // @param pkey the private key 65 static X509* GenerateSelfSignedCert(EVP_PKEY* pkey,
|
/external/vboot_reference/tests/ |
H A D | vb21_host_key_tests.c | 38 struct vb2_packed_private_key *pkey; local 94 pkey = (struct vb2_packed_private_key *)buf; 105 pkey->c.magic = VB2_MAGIC_PACKED_KEY; 112 pkey->c.desc_size++; 118 pkey->key_size += pkey->c.total_size; 124 pkey->c.struct_version_major++; 130 pkey->c.struct_version_minor++; 136 pkey->key_size -= 32; 142 pkey 172 struct vb2_packed_key *pkey; local [all...] |
/external/vboot_reference/host/lib21/ |
H A D | host_key.c | 90 const struct vb2_packed_private_key *pkey = local 103 if (pkey->c.magic != VB2_MAGIC_PACKED_PRIVATE_KEY) 110 if (vb2_verify_common_member(pkey, &min_offset, 111 pkey->key_offset, pkey->key_size)) 119 if (pkey->c.struct_version_major != 129 key->sig_alg = pkey->sig_alg; 130 key->hash_alg = pkey->hash_alg; 131 key->guid = pkey->guid; 134 if (pkey 233 struct vb2_packed_private_key pkey = { local 567 struct vb2_packed_key *pkey; local [all...] |
/external/boringssl/src/ssl/ |
H A D | ssl_privkey.cc | 79 static int ssl_set_pkey(CERT *cert, EVP_PKEY *pkey) { argument 80 if (!ssl_is_key_type_supported(pkey->type)) { 88 !ssl_cert_check_private_key(cert, pkey)) { 93 EVP_PKEY_up_ref(pkey); 94 cert->privatekey = pkey; 142 static int pkey_supports_algorithm(const SSL *ssl, EVP_PKEY *pkey, argument 146 EVP_PKEY_id(pkey) != alg->pkey_type) { 160 EC_KEY_get0_group(EVP_PKEY_get0_EC_KEY(pkey))) != alg->curve)) { 168 static int setup_ctx(SSL *ssl, EVP_MD_CTX *ctx, EVP_PKEY *pkey, uint16_t sigalg, argument 170 if (!pkey_supports_algorithm(ssl, pkey, sigal 224 ssl_public_key_verify(SSL *ssl, Span<const uint8_t> signature, uint16_t sigalg, EVP_PKEY *pkey, Span<const uint8_t> in) argument 322 SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) argument 375 SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) argument [all...] |
/external/boringssl/include/openssl/ |
H A D | evp.h | 88 // EVP_PKEY_free frees all data referenced by |pkey| and then frees |pkey| 90 OPENSSL_EXPORT void EVP_PKEY_free(EVP_PKEY *pkey); 92 // EVP_PKEY_up_ref increments the reference count of |pkey| and returns one. 93 OPENSSL_EXPORT int EVP_PKEY_up_ref(EVP_PKEY *pkey); 95 // EVP_PKEY_is_opaque returns one if |pkey| is opaque. Opaque keys are backed by 98 OPENSSL_EXPORT int EVP_PKEY_is_opaque(const EVP_PKEY *pkey); 111 // EVP_PKEY_missing_parameters returns one if |pkey| is missing needed 113 OPENSSL_EXPORT int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); 116 // |pkey| 815 } pkey; member in struct:evp_pkey_st [all...] |
/external/boringssl/src/include/openssl/ |
H A D | evp.h | 88 // EVP_PKEY_free frees all data referenced by |pkey| and then frees |pkey| 90 OPENSSL_EXPORT void EVP_PKEY_free(EVP_PKEY *pkey); 92 // EVP_PKEY_up_ref increments the reference count of |pkey| and returns one. 93 OPENSSL_EXPORT int EVP_PKEY_up_ref(EVP_PKEY *pkey); 95 // EVP_PKEY_is_opaque returns one if |pkey| is opaque. Opaque keys are backed by 98 OPENSSL_EXPORT int EVP_PKEY_is_opaque(const EVP_PKEY *pkey); 111 // EVP_PKEY_missing_parameters returns one if |pkey| is missing needed 113 OPENSSL_EXPORT int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); 116 // |pkey| 815 } pkey; member in struct:evp_pkey_st [all...] |