Lines Matching refs:x
33 static EVP_PKEY *pem_read_bio_key_decoder(BIO *bp, EVP_PKEY **x, in pem_read_bio_key_decoder() argument
89 if (x != NULL) { in pem_read_bio_key_decoder()
90 EVP_PKEY_free(*x); in pem_read_bio_key_decoder()
91 *x = pkey; in pem_read_bio_key_decoder()
99 static EVP_PKEY *pem_read_bio_key_legacy(BIO *bp, EVP_PKEY **x, in pem_read_bio_key_legacy() argument
141 if (x != NULL) { in pem_read_bio_key_legacy()
142 EVP_PKEY_free(*x); in pem_read_bio_key_legacy()
143 *x = ret; in pem_read_bio_key_legacy()
169 if (x != NULL) { in pem_read_bio_key_legacy()
170 EVP_PKEY_free(*x); in pem_read_bio_key_legacy()
171 *x = ret; in pem_read_bio_key_legacy()
179 ret = ossl_d2i_PrivateKey_legacy(ameth->pkey_id, x, &p, len, libctx, in pem_read_bio_key_legacy()
184 ret = ossl_d2i_PUBKEY_legacy(x, &p, len); in pem_read_bio_key_legacy()
198 if (x) { in pem_read_bio_key_legacy()
199 EVP_PKEY_free(*x); in pem_read_bio_key_legacy()
200 *x = ret; in pem_read_bio_key_legacy()
214 static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x, in pem_read_bio_key() argument
241 ret = pem_read_bio_key_decoder(bp, x, ossl_pw_pem_password, &pwdata, in pem_read_bio_key()
245 || (ret = pem_read_bio_key_legacy(bp, x, in pem_read_bio_key()
262 EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *bp, EVP_PKEY **x, in PEM_read_bio_PUBKEY_ex() argument
266 return pem_read_bio_key(bp, x, cb, u, libctx, propq, in PEM_read_bio_PUBKEY_ex()
270 EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, in PEM_read_bio_PUBKEY() argument
273 return PEM_read_bio_PUBKEY_ex(bp, x, cb, u, NULL, NULL); in PEM_read_bio_PUBKEY()
277 EVP_PKEY *PEM_read_PUBKEY_ex(FILE *fp, EVP_PKEY **x, in PEM_read_PUBKEY_ex() argument
289 ret = PEM_read_bio_PUBKEY_ex(b, x, cb, u, libctx, propq); in PEM_read_PUBKEY_ex()
294 EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) in PEM_read_PUBKEY() argument
296 return PEM_read_PUBKEY_ex(fp, x, cb, u, NULL, NULL); in PEM_read_PUBKEY()
300 EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x, in PEM_read_bio_PrivateKey_ex() argument
304 return pem_read_bio_key(bp, x, cb, u, libctx, propq, in PEM_read_bio_PrivateKey_ex()
309 EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, in PEM_read_bio_PrivateKey() argument
312 return PEM_read_bio_PrivateKey_ex(bp, x, cb, u, NULL, NULL); in PEM_read_bio_PrivateKey()
323 if (x != NULL && (x->ameth == NULL || x->ameth->priv_encode != NULL)) in PEM_write_cb_ex_fnsig()
324 return PEM_write_bio_PKCS8PrivateKey(out, x, enc, in PEM_write_cb_ex_fnsig()
326 return PEM_write_bio_PrivateKey_traditional(out, x, enc, kstr, klen, cb, u); in PEM_write_cb_ex_fnsig()
331 return PEM_write_bio_PrivateKey_ex(out, x, enc, kstr, klen, cb, u, in PEM_write_cb_fnsig()
339 int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x, in PEM_write_bio_PrivateKey_traditional() argument
348 if (x == NULL) in PEM_write_bio_PrivateKey_traditional()
351 if (evp_pkey_is_assigned(x) in PEM_write_bio_PrivateKey_traditional()
352 && evp_pkey_is_provided(x) in PEM_write_bio_PrivateKey_traditional()
353 && evp_pkey_copy_downgraded(©, x)) in PEM_write_bio_PrivateKey_traditional()
354 x = copy; in PEM_write_bio_PrivateKey_traditional()
356 if (x->ameth == NULL || x->ameth->old_priv_encode == NULL) { in PEM_write_bio_PrivateKey_traditional()
361 BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); in PEM_write_bio_PrivateKey_traditional()
363 pem_str, bp, x, enc, kstr, klen, cb, u); in PEM_write_bio_PrivateKey_traditional()
374 EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x, in PEM_read_bio_Parameters_ex() argument
381 return pem_read_bio_key(bp, x, no_password_cb, NULL, libctx, propq, in PEM_read_bio_Parameters_ex()
385 EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x) in PEM_read_bio_Parameters() argument
387 return PEM_read_bio_Parameters_ex(bp, x, NULL, NULL); in PEM_read_bio_Parameters()
398 if (!x->ameth || !x->ameth->param_encode) in PEM_write_fnsig()
401 BIO_snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); in PEM_write_fnsig()
402 return PEM_ASN1_write_bio((i2d_of_void *)x->ameth->param_encode, in PEM_write_fnsig()
403 pem_str, out, x, NULL, NULL, 0, 0, NULL); in PEM_write_fnsig()
407 EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, in PEM_read_PrivateKey_ex() argument
419 ret = PEM_read_bio_PrivateKey_ex(b, x, cb, u, libctx, propq); in PEM_read_PrivateKey_ex()
424 EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, in PEM_read_PrivateKey() argument
427 return PEM_read_PrivateKey_ex(fp, x, cb, u, NULL, NULL); in PEM_read_PrivateKey()
439 ret = PEM_write_bio_PrivateKey_ex(b, x, enc, kstr, klen, cb, u, in PEM_write_cb_ex_fnsig()
447 return PEM_write_PrivateKey_ex(out, x, enc, kstr, klen, cb, u, NULL, NULL); in PEM_write_cb_fnsig()