parent
6ba693f70e
commit
6d6c5d202f
|
@ -3,6 +3,9 @@
|
||||||
- markus@cvs.openbsd.org 2002/03/06 00:20:54
|
- markus@cvs.openbsd.org 2002/03/06 00:20:54
|
||||||
[compat.c dh.c]
|
[compat.c dh.c]
|
||||||
compat.c
|
compat.c
|
||||||
|
- markus@cvs.openbsd.org 2002/03/06 00:23:27
|
||||||
|
[compat.c dh.c]
|
||||||
|
undo
|
||||||
|
|
||||||
20020305
|
20020305
|
||||||
- stevesk@cvs.openbsd.org 2002/03/02 09:34:42
|
- stevesk@cvs.openbsd.org 2002/03/02 09:34:42
|
||||||
|
@ -7804,4 +7807,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1909 2002/03/07 01:58:24 djm Exp $
|
$Id: ChangeLog,v 1.1910 2002/03/07 01:58:42 djm Exp $
|
||||||
|
|
6
compat.c
6
compat.c
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: compat.c,v 1.59 2002/03/06 00:20:54 markus Exp $");
|
RCSID("$OpenBSD: compat.c,v 1.60 2002/03/06 00:23:27 markus Exp $");
|
||||||
|
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
|
@ -73,8 +73,8 @@ compat_datafellows(const char *version)
|
||||||
{ "OpenSSH_2.5.0*,"
|
{ "OpenSSH_2.5.0*,"
|
||||||
"OpenSSH_2.5.1*,"
|
"OpenSSH_2.5.1*,"
|
||||||
"OpenSSH_2.5.2*", SSH_OLD_DHGEX|SSH_BUG_NOREKEY },
|
"OpenSSH_2.5.2*", SSH_OLD_DHGEX|SSH_BUG_NOREKEY },
|
||||||
{ "OpenSSH_2.5.3*", SSH_BUG_NOREKEY },
|
{ "OpenSSH_2.5.3*",
|
||||||
{ "Sun_SSH_1.0*", SSH_BUG_NOREKEY },
|
SSH_BUG_NOREKEY },
|
||||||
{ "OpenSSH*", 0 },
|
{ "OpenSSH*", 0 },
|
||||||
{ "*MindTerm*", 0 },
|
{ "*MindTerm*", 0 },
|
||||||
{ "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
|
{ "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
|
||||||
|
|
9
dh.c
9
dh.c
|
@ -23,14 +23,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: dh.c,v 1.20 2002/03/06 00:20:54 markus Exp $");
|
RCSID("$OpenBSD: dh.c,v 1.21 2002/03/06 00:23:27 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/err.h>
|
|
||||||
|
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
|
@ -208,10 +207,8 @@ dh_gen_key(DH *dh, int need)
|
||||||
if ((dh->priv_key = BN_new()) == NULL)
|
if ((dh->priv_key = BN_new()) == NULL)
|
||||||
fatal("dh_gen_key: BN_new failed");
|
fatal("dh_gen_key: BN_new failed");
|
||||||
/* generate a 2*need bits random private exponent */
|
/* generate a 2*need bits random private exponent */
|
||||||
if (!BN_rand(dh->priv_key, 2*need, 0, 0)) {
|
if (!BN_rand(dh->priv_key, 2*need, 0, 0))
|
||||||
int ecode = ERR_get_error();
|
fatal("dh_gen_key: BN_rand failed");
|
||||||
fatal("dh_gen_key: BN_rand failed: %s", ERR_error_string(ecode, NULL));
|
|
||||||
}
|
|
||||||
if (DH_generate_key(dh) == 0)
|
if (DH_generate_key(dh) == 0)
|
||||||
fatal("DH_generate_key");
|
fatal("DH_generate_key");
|
||||||
for (i = 0; i <= BN_num_bits(dh->priv_key); i++)
|
for (i = 0; i <= BN_num_bits(dh->priv_key); i++)
|
||||||
|
|
Loading…
Reference in New Issue