Lines Matching refs:key
28 int ossl_ecx_public_from_private(ECX_KEY *key) in ossl_ecx_public_from_private() argument
30 switch (key->type) { in ossl_ecx_public_from_private()
32 ossl_x25519_public_from_private(key->pubkey, key->privkey); in ossl_ecx_public_from_private()
35 if (!ossl_ed25519_public_from_private(key->libctx, key->pubkey, in ossl_ecx_public_from_private()
36 key->privkey, key->propq)) { in ossl_ecx_public_from_private()
42 ossl_x448_public_from_private(key->pubkey, key->privkey); in ossl_ecx_public_from_private()
45 if (!ossl_ed448_public_from_private(key->libctx, key->pubkey, in ossl_ecx_public_from_private()
46 key->privkey, key->propq)) { in ossl_ecx_public_from_private()
109 ECX_KEY *ossl_ecx_key_dup(const ECX_KEY *key, int selection) in ossl_ecx_key_dup() argument
116 ret->libctx = key->libctx; in ossl_ecx_key_dup()
118 ret->keylen = key->keylen; in ossl_ecx_key_dup()
119 ret->type = key->type; in ossl_ecx_key_dup()
124 if (key->propq != NULL) { in ossl_ecx_key_dup()
125 ret->propq = OPENSSL_strdup(key->propq); in ossl_ecx_key_dup()
131 && key->haspubkey == 1) { in ossl_ecx_key_dup()
132 memcpy(ret->pubkey, key->pubkey, sizeof(ret->pubkey)); in ossl_ecx_key_dup()
137 && key->privkey != NULL) { in ossl_ecx_key_dup()
142 memcpy(ret->privkey, key->privkey, ret->keylen); in ossl_ecx_key_dup()
159 ECX_KEY *key = NULL; in ossl_ecx_key_op() local
186 key = ossl_ecx_key_new(libctx, KEYNID2TYPE(id), 1, propq); in ossl_ecx_key_op()
187 if (key == NULL) { in ossl_ecx_key_op()
191 pubkey = key->pubkey; in ossl_ecx_key_op()
196 privkey = ossl_ecx_key_allocate_privkey(key); in ossl_ecx_key_op()
217 if (!ossl_ecx_public_from_private(key)) { in ossl_ecx_key_op()
223 return key; in ossl_ecx_key_op()
225 ossl_ecx_key_free(key); in ossl_ecx_key_op()