Lines Matching refs:auth
127 ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply)
137 if (atomicio(vwrite, auth->fd, buf, 4) != 4 ||
138 atomicio(vwrite, auth->fd, buffer_ptr(request),
147 if (atomicio(read, auth->fd, buf, 4) != 4) {
163 if (atomicio(read, auth->fd, buf, l) != l) {
197 AuthenticationConnection *auth;
209 auth = xcalloc(1, sizeof(*auth));
210 auth->fd = sock;
211 buffer_init(&auth->identities);
212 auth->howmany = 0;
214 return auth;
223 ssh_close_authentication_connection(AuthenticationConnection *auth)
225 buffer_free(&auth->identities);
226 close(auth->fd);
227 free(auth);
232 ssh_lock_agent(AuthenticationConnection *auth, int lock, const char *password)
241 if (ssh_request_reply(auth, &msg, &msg) == 0) {
255 ssh_get_num_identities(AuthenticationConnection *auth, int version)
280 buffer_clear(&auth->identities);
281 if (ssh_request_reply(auth, &request, &auth->identities) == 0) {
288 type = buffer_get_char(&auth->identities);
296 auth->howmany = buffer_get_int(&auth->identities);
297 if ((u_int)auth->howmany > 1024)
299 auth->howmany);
301 return auth->howmany;
305 ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int version)
308 if (ssh_get_num_identities(auth, version) > 0)
309 return ssh_get_next_identity(auth, comment, version);
314 ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int version)
323 if (auth->howmany <= 0)
333 bits = buffer_get_int(&auth->identities);
334 buffer_get_bignum(&auth->identities, key->rsa->e);
335 buffer_get_bignum(&auth->identities, key->rsa->n);
336 *comment = buffer_get_string(&auth->identities, NULL);
343 blob = buffer_get_string(&auth->identities, &blen);
344 *comment = buffer_get_string(&auth->identities, NULL);
352 auth->howmany--;
365 ssh_decrypt_challenge(AuthenticationConnection *auth,
391 if (ssh_request_reply(auth, &buffer, &buffer) == 0) {
416 ssh_agent_sign(AuthenticationConnection *auth,
441 if (ssh_request_reply(auth, &msg, &msg) == 0) {
487 ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key,
531 if (ssh_request_reply(auth, &msg, &msg) == 0) {
546 ssh_remove_identity(AuthenticationConnection *auth, Key *key)
569 if (ssh_request_reply(auth, &msg, &msg) == 0) {
579 ssh_update_card(AuthenticationConnection *auth, int add,
606 if (ssh_request_reply(auth, &msg, &msg) == 0) {
621 ssh_remove_all_identities(AuthenticationConnection *auth, int version)
632 if (ssh_request_reply(auth, &msg, &msg) == 0) {