From 87d6cf1cbc91df6815db8fe0acc7c910bc3d18e4 Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Fri, 30 Nov 2018 02:24:52 +0000 Subject: upstream: don't attempt to connect to empty SSH_AUTH_SOCK; bz#293 OpenBSD-Commit-ID: 0e8fc8f19f14b21adef7109e0faa583d87c0e929 --- authfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'authfd.c') diff --git a/authfd.c b/authfd.c index ecdd869ab..cc9c6502d 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.111 2018/07/09 21:59:10 markus Exp $ */ +/* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -94,7 +94,7 @@ ssh_get_authentication_socket(int *fdp) *fdp = -1; authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); - if (!authsocket) + if (authsocket == NULL || *authsocket == '\0') return SSH_ERR_AGENT_NOT_PRESENT; memset(&sunaddr, 0, sizeof(sunaddr)); -- cgit v1.2.3 From 007a88b48c97d092ed2f501bbdcb70d9925277be Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Thu, 27 Dec 2018 23:02:11 +0000 Subject: upstream: Request RSA-SHA2 signatures for rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms; ok markus@ OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033 --- authfd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'authfd.c') diff --git a/authfd.c b/authfd.c index cc9c6502d..95348abfc 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.112 2018/11/30 02:24:52 djm Exp $ */ +/* $OpenBSD: authfd.c,v 1.113 2018/12/27 23:02:11 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -327,10 +327,12 @@ ssh_free_identitylist(struct ssh_identitylist *idl) static u_int agent_encode_alg(const struct sshkey *key, const char *alg) { - if (alg != NULL && key->type == KEY_RSA) { - if (strcmp(alg, "rsa-sha2-256") == 0) + if (alg != NULL && sshkey_type_plain(key->type) == KEY_RSA) { + if (strcmp(alg, "rsa-sha2-256") == 0 || + strcmp(alg, "rsa-sha2-256-cert-v01@openssh.com") == 0) return SSH_AGENT_RSA_SHA2_256; - else if (strcmp(alg, "rsa-sha2-512") == 0) + if (strcmp(alg, "rsa-sha2-512") == 0 || + strcmp(alg, "rsa-sha2-512-cert-v01@openssh.com") == 0) return SSH_AGENT_RSA_SHA2_512; } return 0; -- cgit v1.2.3