mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
- dtucker@cvs.openbsd.org 2013/11/07 11:58:27
[cipher.c cipher.h kex.c kex.h mac.c mac.h servconf.c ssh.c] Output the effective values of Ciphers, MACs and KexAlgorithms when the default has not been overridden. ok markus@
This commit is contained in:
parent
08998c5fb9
commit
690d989008
@ -3,6 +3,11 @@
|
|||||||
- dtucker@cvs.openbsd.org 2013/11/08 01:06:14
|
- dtucker@cvs.openbsd.org 2013/11/08 01:06:14
|
||||||
[regress/rekey.sh]
|
[regress/rekey.sh]
|
||||||
Rekey less frequently during tests to speed them up
|
Rekey less frequently during tests to speed them up
|
||||||
|
- (djm) OpenBSD CVS Sync
|
||||||
|
- dtucker@cvs.openbsd.org 2013/11/07 11:58:27
|
||||||
|
[cipher.c cipher.h kex.c kex.h mac.c mac.h servconf.c ssh.c]
|
||||||
|
Output the effective values of Ciphers, MACs and KexAlgorithms when
|
||||||
|
the default has not been overridden. ok markus@
|
||||||
|
|
||||||
20131107
|
20131107
|
||||||
- (djm) [ssh-pkcs11.c] Bring back "non-constant initialiser" fix (rev 1.5)
|
- (djm) [ssh-pkcs11.c] Bring back "non-constant initialiser" fix (rev 1.5)
|
||||||
|
8
cipher.c
8
cipher.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cipher.c,v 1.89 2013/05/17 00:13:13 djm Exp $ */
|
/* $OpenBSD: cipher.c,v 1.90 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -100,9 +100,9 @@ static const struct Cipher ciphers[] = {
|
|||||||
|
|
||||||
/*--*/
|
/*--*/
|
||||||
|
|
||||||
/* Returns a comma-separated list of supported ciphers. */
|
/* Returns a list of supported ciphers separated by the specified char. */
|
||||||
char *
|
char *
|
||||||
cipher_alg_list(void)
|
cipher_alg_list(char sep)
|
||||||
{
|
{
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
size_t nlen, rlen = 0;
|
size_t nlen, rlen = 0;
|
||||||
@ -112,7 +112,7 @@ cipher_alg_list(void)
|
|||||||
if (c->number != SSH_CIPHER_SSH2)
|
if (c->number != SSH_CIPHER_SSH2)
|
||||||
continue;
|
continue;
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
ret[rlen++] = '\n';
|
ret[rlen++] = sep;
|
||||||
nlen = strlen(c->name);
|
nlen = strlen(c->name);
|
||||||
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
||||||
memcpy(ret + rlen, c->name, nlen + 1);
|
memcpy(ret + rlen, c->name, nlen + 1);
|
||||||
|
4
cipher.h
4
cipher.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cipher.h,v 1.40 2013/04/19 01:06:50 djm Exp $ */
|
/* $OpenBSD: cipher.h,v 1.41 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
@ -75,7 +75,7 @@ const Cipher *cipher_by_number(int);
|
|||||||
int cipher_number(const char *);
|
int cipher_number(const char *);
|
||||||
char *cipher_name(int);
|
char *cipher_name(int);
|
||||||
int ciphers_valid(const char *);
|
int ciphers_valid(const char *);
|
||||||
char *cipher_alg_list(void);
|
char *cipher_alg_list(char);
|
||||||
void cipher_init(CipherContext *, const Cipher *, const u_char *, u_int,
|
void cipher_init(CipherContext *, const Cipher *, const u_char *, u_int,
|
||||||
const u_char *, u_int, int);
|
const u_char *, u_int, int);
|
||||||
void cipher_crypt(CipherContext *, u_char *, const u_char *,
|
void cipher_crypt(CipherContext *, u_char *, const u_char *,
|
||||||
|
6
kex.c
6
kex.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kex.c,v 1.92 2013/11/02 21:59:15 markus Exp $ */
|
/* $OpenBSD: kex.c,v 1.93 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -85,7 +85,7 @@ static const struct kexalg kexalgs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
char *
|
char *
|
||||||
kex_alg_list(void)
|
kex_alg_list(char sep)
|
||||||
{
|
{
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
size_t nlen, rlen = 0;
|
size_t nlen, rlen = 0;
|
||||||
@ -93,7 +93,7 @@ kex_alg_list(void)
|
|||||||
|
|
||||||
for (k = kexalgs; k->name != NULL; k++) {
|
for (k = kexalgs; k->name != NULL; k++) {
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
ret[rlen++] = '\n';
|
ret[rlen++] = sep;
|
||||||
nlen = strlen(k->name);
|
nlen = strlen(k->name);
|
||||||
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
||||||
memcpy(ret + rlen, k->name, nlen + 1);
|
memcpy(ret + rlen, k->name, nlen + 1);
|
||||||
|
4
kex.h
4
kex.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: kex.h,v 1.57 2013/11/02 21:59:15 markus Exp $ */
|
/* $OpenBSD: kex.h,v 1.58 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
|
||||||
@ -146,7 +146,7 @@ struct Kex {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int kex_names_valid(const char *);
|
int kex_names_valid(const char *);
|
||||||
char *kex_alg_list(void);
|
char *kex_alg_list(char);
|
||||||
|
|
||||||
Kex *kex_setup(char *[PROPOSAL_MAX]);
|
Kex *kex_setup(char *[PROPOSAL_MAX]);
|
||||||
void kex_finish(Kex *);
|
void kex_finish(Kex *);
|
||||||
|
8
mac.c
8
mac.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: mac.c,v 1.24 2013/06/03 00:03:18 dtucker Exp $ */
|
/* $OpenBSD: mac.c,v 1.25 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -91,9 +91,9 @@ static const struct macalg macs[] = {
|
|||||||
{ NULL, 0, NULL, 0, 0, 0, 0 }
|
{ NULL, 0, NULL, 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Returns a comma-separated list of supported MACs. */
|
/* Returns a list of supported MACs separated by the specified char. */
|
||||||
char *
|
char *
|
||||||
mac_alg_list(void)
|
mac_alg_list(char sep)
|
||||||
{
|
{
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
size_t nlen, rlen = 0;
|
size_t nlen, rlen = 0;
|
||||||
@ -101,7 +101,7 @@ mac_alg_list(void)
|
|||||||
|
|
||||||
for (m = macs; m->name != NULL; m++) {
|
for (m = macs; m->name != NULL; m++) {
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
ret[rlen++] = '\n';
|
ret[rlen++] = sep;
|
||||||
nlen = strlen(m->name);
|
nlen = strlen(m->name);
|
||||||
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
ret = xrealloc(ret, 1, rlen + nlen + 2);
|
||||||
memcpy(ret + rlen, m->name, nlen + 1);
|
memcpy(ret + rlen, m->name, nlen + 1);
|
||||||
|
4
mac.h
4
mac.h
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: mac.h,v 1.7 2013/04/19 01:06:50 djm Exp $ */
|
/* $OpenBSD: mac.h,v 1.8 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
* Copyright (c) 2001 Markus Friedl. All rights reserved.
|
||||||
*
|
*
|
||||||
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int mac_valid(const char *);
|
int mac_valid(const char *);
|
||||||
char *mac_alg_list(void);
|
char *mac_alg_list(char);
|
||||||
int mac_setup(Mac *, char *);
|
int mac_setup(Mac *, char *);
|
||||||
int mac_init(Mac *);
|
int mac_init(Mac *);
|
||||||
u_char *mac_compute(Mac *, u_int32_t, u_char *, int);
|
u_char *mac_compute(Mac *, u_int32_t, u_char *, int);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
/* $OpenBSD: servconf.c,v 1.244 2013/10/29 09:48:02 djm Exp $ */
|
/* $OpenBSD: servconf.c,v 1.245 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
* All rights reserved
|
* All rights reserved
|
||||||
@ -2037,8 +2037,9 @@ dump_config(ServerOptions *o)
|
|||||||
/* string arguments */
|
/* string arguments */
|
||||||
dump_cfg_string(sPidFile, o->pid_file);
|
dump_cfg_string(sPidFile, o->pid_file);
|
||||||
dump_cfg_string(sXAuthLocation, o->xauth_location);
|
dump_cfg_string(sXAuthLocation, o->xauth_location);
|
||||||
dump_cfg_string(sCiphers, o->ciphers);
|
dump_cfg_string(sCiphers, o->ciphers ? o->ciphers :
|
||||||
dump_cfg_string(sMacs, o->macs);
|
cipher_alg_list(','));
|
||||||
|
dump_cfg_string(sMacs, o->macs ? o->macs : mac_alg_list(','));
|
||||||
dump_cfg_string(sBanner, o->banner);
|
dump_cfg_string(sBanner, o->banner);
|
||||||
dump_cfg_string(sForceCommand, o->adm_forced_command);
|
dump_cfg_string(sForceCommand, o->adm_forced_command);
|
||||||
dump_cfg_string(sChrootDirectory, o->chroot_directory);
|
dump_cfg_string(sChrootDirectory, o->chroot_directory);
|
||||||
@ -2050,6 +2051,8 @@ dump_config(ServerOptions *o)
|
|||||||
dump_cfg_string(sAuthorizedKeysCommand, o->authorized_keys_command);
|
dump_cfg_string(sAuthorizedKeysCommand, o->authorized_keys_command);
|
||||||
dump_cfg_string(sAuthorizedKeysCommandUser, o->authorized_keys_command_user);
|
dump_cfg_string(sAuthorizedKeysCommandUser, o->authorized_keys_command_user);
|
||||||
dump_cfg_string(sHostKeyAgent, o->host_key_agent);
|
dump_cfg_string(sHostKeyAgent, o->host_key_agent);
|
||||||
|
dump_cfg_string(sKexAlgorithms, o->kex_algorithms ? o->kex_algorithms :
|
||||||
|
kex_alg_list(','));
|
||||||
|
|
||||||
/* string arguments requiring a lookup */
|
/* string arguments requiring a lookup */
|
||||||
dump_cfg_string(sLogLevel, log_level_name(o->log_level));
|
dump_cfg_string(sLogLevel, log_level_name(o->log_level));
|
||||||
|
8
ssh.c
8
ssh.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssh.c,v 1.391 2013/10/25 23:04:51 djm Exp $ */
|
/* $OpenBSD: ssh.c,v 1.392 2013/11/07 11:58:27 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -520,11 +520,11 @@ main(int ac, char **av)
|
|||||||
case 'Q': /* deprecated */
|
case 'Q': /* deprecated */
|
||||||
cp = NULL;
|
cp = NULL;
|
||||||
if (strcasecmp(optarg, "cipher") == 0)
|
if (strcasecmp(optarg, "cipher") == 0)
|
||||||
cp = cipher_alg_list();
|
cp = cipher_alg_list('\n');
|
||||||
else if (strcasecmp(optarg, "mac") == 0)
|
else if (strcasecmp(optarg, "mac") == 0)
|
||||||
cp = mac_alg_list();
|
cp = mac_alg_list('\n');
|
||||||
else if (strcasecmp(optarg, "kex") == 0)
|
else if (strcasecmp(optarg, "kex") == 0)
|
||||||
cp = kex_alg_list();
|
cp = kex_alg_list('\n');
|
||||||
else if (strcasecmp(optarg, "key") == 0)
|
else if (strcasecmp(optarg, "key") == 0)
|
||||||
cp = key_alg_list();
|
cp = key_alg_list();
|
||||||
if (cp == NULL)
|
if (cp == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user