Lines Matching defs:pubkey
702 EVP_PKEY *pubkey;
707 if ((pubkey = PEM_read_PUBKEY(fp, NULL, NULL, NULL)) == NULL) {
712 switch (EVP_PKEY_base_id(pubkey)) {
717 (*k)->pkey = pubkey;
718 pubkey = NULL;
725 (*k)->dsa = EVP_PKEY_get1_DSA(pubkey);
731 if (((*k)->ecdsa_nid = sshkey_ecdsa_fixup_group(pubkey)) == -1)
734 (*k)->pkey = pubkey;
735 pubkey = NULL;
738 fatal_f("unsupported pubkey type %d",
739 EVP_PKEY_base_id(pubkey));
741 EVP_PKEY_free(pubkey);
944 struct sshkey *privkey = NULL, *pubkey = NULL;
949 if ((r = sshkey_load_public(path, &pubkey, &comment)) != 0)
951 if (pubkey == NULL || comment == NULL || *comment == '\0') {
957 if (pubkey == NULL && privkey == NULL)
960 fingerprint_one_key(pubkey == NULL ? privkey : pubkey, comment);
961 sshkey_free(pubkey);
1858 fatal_r(r, "load pubkey \"%s\"", tmp);
2525 load_sign_key(const char *keypath, const struct sshkey *pubkey)
2558 if (!sshkey_equal_public(pubkey, privkey)) {
2563 if (sshkey_is_cert(pubkey) && !sshkey_is_cert(privkey)) {
2572 if ((r = sshkey_cert_copy(pubkey, privkey)) != 0) {
2704 strcasecmp(opts[i], "print-pubkey") == 0) {
2728 struct sshkey *pubkey = NULL, *privkey = NULL, *signkey = NULL;
2743 if ((r = sshkey_load_public(keypath, &pubkey, NULL)) != 0) {
2753 if ((r = ssh_agent_has_key(agent_fd, pubkey)) == 0)
2764 if ((privkey = load_sign_key(keypath, pubkey)) == NULL)
2769 signkey = pubkey;
2798 sshkey_free(pubkey);