summaryrefslogtreecommitdiff
path: root/sshkey-xmss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshkey-xmss.c')
-rw-r--r--sshkey-xmss.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sshkey-xmss.c b/sshkey-xmss.c
index 5d66ee790..aaae70289 100644
--- a/sshkey-xmss.c
+++ b/sshkey-xmss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshkey-xmss.c,v 1.1 2018/02/23 15:58:38 markus Exp $ */ 1/* $OpenBSD: sshkey-xmss.c,v 1.3 2018/07/09 21:59:10 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2017 Markus Friedl. All rights reserved. 3 * Copyright (c) 2017 Markus Friedl. All rights reserved.
4 * 4 *
@@ -66,7 +66,7 @@ struct ssh_xmss_state {
66 treehash_inst *treehash; 66 treehash_inst *treehash;
67 67
68 u_int32_t idx; /* state read from file */ 68 u_int32_t idx; /* state read from file */
69 u_int32_t maxidx; /* resticted # of signatures */ 69 u_int32_t maxidx; /* restricted # of signatures */
70 int have_state; /* .state file exists */ 70 int have_state; /* .state file exists */
71 int lockfd; /* locked in sshkey_xmss_get_state() */ 71 int lockfd; /* locked in sshkey_xmss_get_state() */
72 int allow_update; /* allow sshkey_xmss_update_state() */ 72 int allow_update; /* allow sshkey_xmss_update_state() */
@@ -583,7 +583,7 @@ sshkey_xmss_update_state(const struct sshkey *k, sshkey_printfn *pr)
583 } 583 }
584 idx = PEEK_U32(k->xmss_sk); 584 idx = PEEK_U32(k->xmss_sk);
585 if (idx == state->idx) { 585 if (idx == state->idx) {
586 /* no signature happend, no need to update */ 586 /* no signature happened, no need to update */
587 ret = 0; 587 ret = 0;
588 goto done; 588 goto done;
589 } else if (idx != state->idx + 1) { 589 } else if (idx != state->idx + 1) {
@@ -625,7 +625,7 @@ sshkey_xmss_update_state(const struct sshkey *k, sshkey_printfn *pr)
625 close(fd); 625 close(fd);
626 goto done; 626 goto done;
627 } 627 }
628 if (atomicio(vwrite, fd, (void *)sshbuf_ptr(enc), sshbuf_len(enc)) != 628 if (atomicio(vwrite, fd, sshbuf_mutable_ptr(enc), sshbuf_len(enc)) !=
629 sshbuf_len(enc)) { 629 sshbuf_len(enc)) {
630 ret = SSH_ERR_SYSTEM_ERROR; 630 ret = SSH_ERR_SYSTEM_ERROR;
631 PRINT("%s: write new state file data: %s", __func__, nstatefile); 631 PRINT("%s: write new state file data: %s", __func__, nstatefile);