diff options
author | Damien Miller <djm@mindrot.org> | 2011-02-04 11:48:33 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-02-04 11:48:33 +1100 |
commit | baf0e28ca9cda83d1214697fd6888064ee05cf45 (patch) | |
tree | 3a135d4c66955ba82f984cac320da6c3a02c3c67 /key.c | |
parent | fb789a9108c47c1c9d49b64950dabf62b56bddce (diff) |
- 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 @@ | |||
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: |