Lines Matching +full:unlock +full:- +full:keys

63 #define MAX_AGENT_IDENTITIES	2048		/* Max keys in agent reply */
99 if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) in ssh_get_authentication_socket_path()
103 if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 || in ssh_get_authentication_socket_path()
104 connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { in ssh_get_authentication_socket_path()
127 *fdp = -1; in ssh_get_authentication_socket()
175 len -= l; in ssh_request_reply()
213 /* Lock/unlock agent */
305 /* Deserialise the response into a list of keys/comments */ in ssh_fetch_identitylist()
307 (idl->keys = calloc(num, sizeof(*idl->keys))) == NULL || in ssh_fetch_identitylist()
308 (idl->comments = calloc(num, sizeof(*idl->comments))) == NULL) { in ssh_fetch_identitylist()
313 if ((r = deserialise_identity2(msg, &(idl->keys[i]), in ssh_fetch_identitylist()
314 &(idl->comments[i]))) != 0) { in ssh_fetch_identitylist()
317 num--; in ssh_fetch_identitylist()
324 idl->nkeys = num; in ssh_fetch_identitylist()
342 for (i = 0; i < idl->nkeys; i++) { in ssh_free_identitylist()
343 if (idl->keys != NULL) in ssh_free_identitylist()
344 sshkey_free(idl->keys[i]); in ssh_free_identitylist()
345 if (idl->comments != NULL) in ssh_free_identitylist()
346 free(idl->comments[i]); in ssh_free_identitylist()
348 free(idl->keys); in ssh_free_identitylist()
349 free(idl->comments); in ssh_free_identitylist()
368 for (i = 0; i < idlist->nkeys; i++) { in ssh_agent_has_key()
369 if (sshkey_equal_public(idlist->keys[i], key)) { in ssh_agent_has_key()
382 * Returns true (non-zero) if the agent gave the correct answer, zero
391 if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) { in agent_encode_alg()
392 if (strcmp(alg, "rsa-sha2-256") == 0 || in agent_encode_alg()
393 strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0) in agent_encode_alg()
395 if (strcmp(alg, "rsa-sha2-512") == 0 || in agent_encode_alg()
396 strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0) in agent_encode_alg()
467 if ((r = sshbuf_put_cstring(b, dch->user)) != 0 || in encode_dest_constraint_hop()
468 (r = sshbuf_put_cstring(b, dch->hostname)) != 0 || in encode_dest_constraint_hop()
471 for (i = 0; i < dch->nkeys; i++) { in encode_dest_constraint_hop()
472 if ((r = sshkey_puts(dch->keys[i], b)) != 0 || in encode_dest_constraint_hop()
473 (r = sshbuf_put_u8(b, dch->key_is_ca[i] != 0)) != 0) in encode_dest_constraint_hop()
493 if ((r = encode_dest_constraint_hop(b, &dc->from)) != 0 || in encode_dest_constraint()
494 (r = encode_dest_constraint_hop(b, &dc->to)) != 0 || in encode_dest_constraint()
534 "sk-provider@openssh.com")) != 0 || in encode_constraints()
551 "restrict-destination-v00@openssh.com")) != 0 || in encode_constraints()
569 "associated-certs-v00@openssh.com")) != 0 || in encode_constraints()
584 * This call is intended only for use by ssh-add(1) and like applications.
600 switch (key->type) { in ssh_add_identity_constrained()
645 * This call is intended only for use by ssh-add(1) and like applications.
658 if (key->type != KEY_UNSPEC) { in ssh_remove_identity()
681 * Add/remove an token-based identity from the authentication server.
682 * This call is intended only for use by ssh-add(1) and like applications.
723 * This call is intended only for use by ssh-add(1) and like applications.
726 * keys from an agent, we generally want to clear both protocol v1 and v2
727 * keys.
765 (r = sshbuf_put_cstring(msg, "session-bind@openssh.com")) != 0 || in ssh_agent_bind_hostkey()