Lines Matching refs:privkey
79 VbPrivateKey *privkey = 0; in vb1_make_keypair() local
114 privkey = (VbPrivateKey *)malloc(sizeof(VbPrivateKey)); in vb1_make_keypair()
115 if (!privkey) in vb1_make_keypair()
118 privkey->rsa_private_key = rsa_key; in vb1_make_keypair()
119 privkey->algorithm = vb1_algorithm; in vb1_make_keypair()
123 if (0 != PrivateKeyWrite(outfile, privkey)) { in vb1_make_keypair()
152 free(privkey); in vb1_make_keypair()
161 struct vb2_private_key *privkey = 0; in vb2_make_keypair() local
193 privkey = calloc(1, sizeof(*privkey)); in vb2_make_keypair()
194 if (!privkey) { in vb2_make_keypair()
198 privkey->rsa_private_key = rsa_key; in vb2_make_keypair()
199 privkey->sig_alg = sig_alg; in vb2_make_keypair()
200 privkey->hash_alg = opt_hash_alg; in vb2_make_keypair()
201 privkey->guid = opt_guid; in vb2_make_keypair()
202 if (opt_desc && vb2_private_key_set_desc(privkey, opt_desc)) { in vb2_make_keypair()
209 if (vb2_private_key_write(privkey, outfile)) { in vb2_make_keypair()
260 if (privkey) /* prevent double-free */ in vb2_make_keypair()
261 privkey->rsa_private_key = 0; in vb2_make_keypair()
262 vb2_private_key_free(privkey); in vb2_make_keypair()