diff options
author | Damien Miller <djm@mindrot.org> | 2011-02-04 01:47:01 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-02-04 01:47:01 +0100 |
commit | 0a5f0129a3d64ac59a1b499cc6310f271c28a020 (patch) | |
tree | 691ece925cb5d470b98bd47a917de4fe408ee6a8 /key.c | |
parent | - djm@cvs.openbsd.org 2011/01/31 21:42:15 (diff) | |
download | openssh-0a5f0129a3d64ac59a1b499cc6310f271c28a020.tar.xz openssh-0a5f0129a3d64ac59a1b499cc6310f271c28a020.zip |
- djm@cvs.openbsd.org 2011/02/04 00:44:21
[key.c]
fix uninitialised nonce variable; reported by Mateusz Kocielski
Diffstat (limited to 'key.c')
-rw-r--r-- | key.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.95 2010/11/10 01:33:07 djm Exp $ */ +/* $OpenBSD: key.c,v 1.96 2011/02/04 00:44:21 djm Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1886,10 +1886,9 @@ key_certify(Key *k, Key *ca) buffer_put_cstring(&k->cert->certblob, key_ssh_name(k)); /* -v01 certs put nonce first */ - if (!key_cert_is_legacy(k)) { - arc4random_buf(&nonce, sizeof(nonce)); + arc4random_buf(&nonce, sizeof(nonce)); + if (!key_cert_is_legacy(k)) buffer_put_string(&k->cert->certblob, nonce, sizeof(nonce)); - } switch (k->type) { case KEY_DSA_CERT_V00: |