Lines Matching refs:prv
3038 sshkey_private_to_blob2(const struct sshkey *prv, struct sshbuf *blob, in sshkey_private_to_blob2() argument
3107 (r = sshkey_to_blob(prv, &pubkeyblob, &pubkeylen)) != 0 || in sshkey_private_to_blob2()
3120 if ((r = sshkey_private_serialize(prv, encrypted)) != 0 || in sshkey_private_to_blob2()
3670 struct sshkey *prv = NULL; in sshkey_parse_private_rsa1() local
3688 if ((prv = sshkey_new_private(KEY_RSA1)) == NULL) { in sshkey_parse_private_rsa1()
3707 (r = sshbuf_get_bignum1(copy, prv->rsa->n)) != 0 || in sshkey_parse_private_rsa1()
3708 (r = sshbuf_get_bignum1(copy, prv->rsa->e)) != 0 || in sshkey_parse_private_rsa1()
3739 if ((r = sshbuf_get_bignum1(decrypted, prv->rsa->d)) != 0 || in sshkey_parse_private_rsa1()
3740 (r = sshbuf_get_bignum1(decrypted, prv->rsa->iqmp)) != 0 || in sshkey_parse_private_rsa1()
3741 (r = sshbuf_get_bignum1(decrypted, prv->rsa->q)) != 0 || in sshkey_parse_private_rsa1()
3742 (r = sshbuf_get_bignum1(decrypted, prv->rsa->p)) != 0) in sshkey_parse_private_rsa1()
3746 if ((r = rsa_generate_additional_parameters(prv->rsa)) != 0) in sshkey_parse_private_rsa1()
3750 if (RSA_blinding_on(prv->rsa, NULL) != 1) { in sshkey_parse_private_rsa1()
3756 *keyp = prv; in sshkey_parse_private_rsa1()
3757 prv = NULL; in sshkey_parse_private_rsa1()
3766 sshkey_free(prv); in sshkey_parse_private_rsa1()
3779 struct sshkey *prv = NULL; in sshkey_parse_private_pem_fileblob() local
3846 if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) { in sshkey_parse_private_pem_fileblob()
3850 prv->rsa = EVP_PKEY_get1_RSA(pk); in sshkey_parse_private_pem_fileblob()
3851 prv->type = KEY_RSA; in sshkey_parse_private_pem_fileblob()
3853 RSA_print_fp(stderr, prv->rsa, 8); in sshkey_parse_private_pem_fileblob()
3855 if (RSA_blinding_on(prv->rsa, NULL) != 1) { in sshkey_parse_private_pem_fileblob()
3861 if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) { in sshkey_parse_private_pem_fileblob()
3865 prv->dsa = EVP_PKEY_get1_DSA(pk); in sshkey_parse_private_pem_fileblob()
3866 prv->type = KEY_DSA; in sshkey_parse_private_pem_fileblob()
3868 DSA_print_fp(stderr, prv->dsa, 8); in sshkey_parse_private_pem_fileblob()
3873 if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) { in sshkey_parse_private_pem_fileblob()
3877 prv->ecdsa = EVP_PKEY_get1_EC_KEY(pk); in sshkey_parse_private_pem_fileblob()
3878 prv->type = KEY_ECDSA; in sshkey_parse_private_pem_fileblob()
3879 prv->ecdsa_nid = sshkey_ecdsa_key_to_nid(prv->ecdsa); in sshkey_parse_private_pem_fileblob()
3880 if (prv->ecdsa_nid == -1 || in sshkey_parse_private_pem_fileblob()
3881 sshkey_curve_nid_to_name(prv->ecdsa_nid) == NULL || in sshkey_parse_private_pem_fileblob()
3882 sshkey_ec_validate_public(EC_KEY_get0_group(prv->ecdsa), in sshkey_parse_private_pem_fileblob()
3883 EC_KEY_get0_public_key(prv->ecdsa)) != 0 || in sshkey_parse_private_pem_fileblob()
3884 sshkey_ec_validate_private(prv->ecdsa) != 0) { in sshkey_parse_private_pem_fileblob()
3889 if (prv != NULL && prv->ecdsa != NULL) in sshkey_parse_private_pem_fileblob()
3890 sshkey_dump_ec_key(prv->ecdsa); in sshkey_parse_private_pem_fileblob()
3899 *keyp = prv; in sshkey_parse_private_pem_fileblob()
3900 prv = NULL; in sshkey_parse_private_pem_fileblob()
3906 sshkey_free(prv); in sshkey_parse_private_pem_fileblob()