summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--key.c7
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ff6362e5..aaf59c35a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
3 - djm@cvs.openbsd.org 2011/01/31 21:42:15 3 - djm@cvs.openbsd.org 2011/01/31 21:42:15
4 [PROTOCOL.mux] 4 [PROTOCOL.mux]
5 cut'n'pasto; from bert.wesarg AT googlemail.com 5 cut'n'pasto; from bert.wesarg AT googlemail.com
6 - djm@cvs.openbsd.org 2011/02/04 00:44:21
7 [key.c]
8 fix uninitialised nonce variable; reported by Mateusz Kocielski
6 9
720110128 1020110128
8 - (djm) [openbsd-compat/port-linux.c] Check whether SELinux is enabled 11 - (djm) [openbsd-compat/port-linux.c] Check whether SELinux is enabled
diff --git a/key.c b/key.c
index 1defb1132..e3a305e66 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.95 2010/11/10 01:33:07 djm Exp $ */ 1/* $OpenBSD: key.c,v 1.96 2011/02/04 00:44:21 djm Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1886,10 +1886,9 @@ key_certify(Key *k, Key *ca)
1886 buffer_put_cstring(&k->cert->certblob, key_ssh_name(k)); 1886 buffer_put_cstring(&k->cert->certblob, key_ssh_name(k));
1887 1887
1888 /* -v01 certs put nonce first */ 1888 /* -v01 certs put nonce first */
1889 if (!key_cert_is_legacy(k)) { 1889 arc4random_buf(&nonce, sizeof(nonce));
1890 arc4random_buf(&nonce, sizeof(nonce)); 1890 if (!key_cert_is_legacy(k))
1891 buffer_put_string(&k->cert->certblob, nonce, sizeof(nonce)); 1891 buffer_put_string(&k->cert->certblob, nonce, sizeof(nonce));
1892 }
1893 1892
1894 switch (k->type) { 1893 switch (k->type) {
1895 case KEY_DSA_CERT_V00: 1894 case KEY_DSA_CERT_V00: