Lines Matching refs:auth

115 ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply)  in ssh_request_reply()  argument
125 if (atomicio(write, auth->fd, buf, 4) != 4 || in ssh_request_reply()
126 atomicio(write, auth->fd, buffer_ptr(request), in ssh_request_reply()
137 l = read(auth->fd, buf + 4 - len, len); in ssh_request_reply()
158 l = read(auth->fd, buf, l); in ssh_request_reply()
195 AuthenticationConnection *auth; in ssh_get_authentication_connection() local
207 auth = xmalloc(sizeof(*auth)); in ssh_get_authentication_connection()
208 auth->fd = sock; in ssh_get_authentication_connection()
209 buffer_init(&auth->identities); in ssh_get_authentication_connection()
210 auth->howmany = 0; in ssh_get_authentication_connection()
212 return auth; in ssh_get_authentication_connection()
221 ssh_close_authentication_connection(AuthenticationConnection *auth) in ssh_close_authentication_connection() argument
223 buffer_free(&auth->identities); in ssh_close_authentication_connection()
224 close(auth->fd); in ssh_close_authentication_connection()
225 xfree(auth); in ssh_close_authentication_connection()
230 ssh_lock_agent(AuthenticationConnection *auth, int lock, const char *password) in ssh_lock_agent() argument
239 if (ssh_request_reply(auth, &msg, &msg) == 0) { in ssh_lock_agent()
253 ssh_get_num_identities(AuthenticationConnection *auth, int version) in ssh_get_num_identities() argument
278 buffer_clear(&auth->identities); in ssh_get_num_identities()
279 if (ssh_request_reply(auth, &request, &auth->identities) == 0) { in ssh_get_num_identities()
286 type = buffer_get_char(&auth->identities); in ssh_get_num_identities()
294 auth->howmany = buffer_get_int(&auth->identities); in ssh_get_num_identities()
295 if (auth->howmany > 1024) in ssh_get_num_identities()
297 auth->howmany); in ssh_get_num_identities()
299 return auth->howmany; in ssh_get_num_identities()
303 ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int version) in ssh_get_first_identity() argument
306 if (ssh_get_num_identities(auth, version) > 0) in ssh_get_first_identity()
307 return ssh_get_next_identity(auth, comment, version); in ssh_get_first_identity()
312 ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int version) in ssh_get_next_identity() argument
320 if (auth->howmany <= 0) in ssh_get_next_identity()
330 bits = buffer_get_int(&auth->identities); in ssh_get_next_identity()
331 buffer_get_bignum(&auth->identities, key->rsa->e); in ssh_get_next_identity()
332 buffer_get_bignum(&auth->identities, key->rsa->n); in ssh_get_next_identity()
333 *comment = buffer_get_string(&auth->identities, NULL); in ssh_get_next_identity()
339 blob = buffer_get_string(&auth->identities, &blen); in ssh_get_next_identity()
340 *comment = buffer_get_string(&auth->identities, NULL); in ssh_get_next_identity()
349 auth->howmany--; in ssh_get_next_identity()
362 ssh_decrypt_challenge(AuthenticationConnection *auth, in ssh_decrypt_challenge() argument
388 if (ssh_request_reply(auth, &buffer, &buffer) == 0) { in ssh_decrypt_challenge()
413 ssh_agent_sign(AuthenticationConnection *auth, in ssh_agent_sign() argument
437 if (ssh_request_reply(auth, &msg, &msg) == 0) { in ssh_agent_sign()
500 ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key, in ssh_add_identity_constrained() argument
535 if (ssh_request_reply(auth, &msg, &msg) == 0) { in ssh_add_identity_constrained()
545 ssh_add_identity(AuthenticationConnection *auth, Key *key, const char *comment) in ssh_add_identity() argument
547 return ssh_add_identity_constrained(auth, key, comment, 0); in ssh_add_identity()
556 ssh_remove_identity(AuthenticationConnection *auth, Key *key) in ssh_remove_identity() argument
579 if (ssh_request_reply(auth, &msg, &msg) == 0) { in ssh_remove_identity()
595 ssh_remove_all_identities(AuthenticationConnection *auth, int version) in ssh_remove_all_identities() argument
606 if (ssh_request_reply(auth, &msg, &msg) == 0) { in ssh_remove_all_identities()