Compare commits

...
7 Commits
Author SHA1 Message Date
[email protected] f429c1b2ef upstream: Request RSA-SHA2 signatures for
rsa-sha2-{256|512}[email protected] cert algorithms; ok markus@

OpenBSD-Commit-ID: afc6f7ca216ccd821656d1c911d2a3deed685033
2018-12-28 10:12:53 +11:00
Damien Miller 4608a60cb4 fix configure test for OpenSSL version
square brackets in case statements may be eaten by autoconf.

Report and fix from Filipp Gunbin; tweaked by naddy@
2018-11-23 10:46:22 +11:00
[email protected] cd9467318b upstream: fix bug in HostbasedAcceptedKeyTypes and
PubkeyAcceptedKeyTypes options. If only RSA-SHA2 siganture types were
specified, then authentication would always fail for RSA keys as the monitor
checks only the base key (not the signature algorithm) type against
*AcceptedKeyTypes. bz#2746; reported by Jakub Jelen; ok dtucker

OpenBSD-Commit-ID: 117bc3dc54578dbdb515a1d3732988cb5b00461b
2018-11-16 13:52:43 +11:00
Darren Tucker 904d478f07 Remove hardcoded service name in cygwin setup.
bz#2922, patch from Christian.Lupien at USherbrooke.ca, sanity check
by vinschen at redhat.com.
2018-11-11 16:00:32 +11:00
Darren Tucker 22092e3751 Fix pasto for HAVE_EVP_CIPHER_CTX_SET_IV.
Prevents unnecessary redefinition.  Patch from mforney at mforney.org.
2018-11-08 13:23:42 +11:00
Darren Tucker 55d7cdda4d Include openssl compatibility.
Patch from rosenp at gmail.com via openssh-unix-dev.
2018-10-22 20:07:09 +11:00
Damien Miller 631165f6c4 fix compile for openssl 1.0.x w/ --with-ssl-engine
bz#2921, patch from cotequeiroz
2018-10-22 11:23:42 +11:00
7 changed files with 46 additions and 12 deletions
+5 -3
View File
@@ -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, "[email protected]") == 0)
return SSH_AGENT_RSA_SHA2_256;
else if (strcmp(alg, "rsa-sha2-512") == 0)
if (strcmp(alg, "rsa-sha2-512") == 0 ||
strcmp(alg, "[email protected]") == 0)
return SSH_AGENT_RSA_SHA2_512;
}
return 0;
+2 -2
View File
@@ -2616,7 +2616,7 @@ if test "x$openssl" = "xyes" ; then
AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
;;
100*) ;; # 1.0.x
101000[0123456]*)
101000[[0123456]]*)
# https://github.com/openssl/openssl/pull/4613
AC_MSG_ERROR([OpenSSL 1.1.x versions prior to 1.1.0g have a bug that breaks their use with OpenSSH (have "$ssl_library_ver")])
;;
@@ -2850,7 +2850,7 @@ if test "x$openssl" = "xyes" ; then
[AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
[Define if libcrypto has EVP_CIPHER_CTX_get_iv])])
AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto],
[AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
[AC_DEFINE([HAVE_EVP_CIPHER_CTX_SET_IV], [1],
[Define if libcrypto has EVP_CIPHER_CTX_set_iv])])
AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto],
+1 -1
View File
@@ -307,7 +307,7 @@ check_service_files_ownership() {
if [ -z "${run_service_as}" ]
then
accnt_name=$(/usr/bin/cygrunsrv -VQ sshd |
accnt_name=$(/usr/bin/cygrunsrv -VQ "${service_name}" |
/usr/bin/sed -ne 's/^Account *: *//gp')
if [ "${accnt_name}" = "LocalSystem" ]
then
+34 -5
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: monitor.c,v 1.186 2018/07/20 03:46:34 djm Exp $ */
/* $OpenBSD: monitor.c,v 1.188 2018/11/16 02:43:56 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -846,6 +846,35 @@ mm_answer_authserv(int sock, struct sshbuf *m)
return (0);
}
/*
* Check that the key type appears in the supplied pattern list, ignoring
* mismatches in the signature algorithm. (Signature algorithm checks are
* performed in the unprivileged authentication code).
* Returns 1 on success, 0 otherwise.
*/
static int
key_base_type_match(const char *method, const struct sshkey *key,
const char *list)
{
char *s, *l, *ol = xstrdup(list);
int found = 0;
l = ol;
for ((s = strsep(&l, ",")); s && *s != '\0'; (s = strsep(&l, ","))) {
if (sshkey_type_from_name(s) == key->type) {
found = 1;
break;
}
}
if (!found) {
error("%s key type %s is not in permitted list %s", method,
sshkey_ssh_name(key), list);
}
free(ol);
return found;
}
int
mm_answer_authpassword(int sock, struct sshbuf *m)
{
@@ -1151,8 +1180,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
break;
if (auth2_key_already_used(authctxt, key))
break;
if (match_pattern_list(sshkey_ssh_name(key),
options.pubkey_key_types, 0) != 1)
if (!key_base_type_match(auth_method, key,
options.pubkey_key_types))
break;
allowed = user_key_allowed(ssh, authctxt->pw, key,
pubkey_auth_attempt, &opts);
@@ -1163,8 +1192,8 @@ mm_answer_keyallowed(int sock, struct sshbuf *m)
break;
if (auth2_key_already_used(authctxt, key))
break;
if (match_pattern_list(sshkey_ssh_name(key),
options.hostbased_key_types, 0) != 1)
if (!key_base_type_match(auth_method, key,
options.hostbased_key_types))
break;
allowed = hostbased_key_allowed(authctxt->pw,
cuser, chost, key);
+1 -1
View File
@@ -76,7 +76,7 @@ ssh_OpenSSL_add_all_algorithms(void)
ENGINE_load_builtin_engines();
ENGINE_register_all_complete();
#if OPENSSL_VERSION_NUMBER < 0x10001000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L
OPENSSL_config(NULL);
#else
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
+1
View File
@@ -40,6 +40,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/rsa.h>
#include "openbsd-compat/openssl-compat.h"
#endif
#include "xmalloc.h"
+2
View File
@@ -29,6 +29,8 @@
#include "ssherr.h"
#include "sshbuf.h"
#include "openbsd-compat/openssl-compat.h"
#include <string.h>
int _ssh_exchange_banner(struct ssh *);