projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
fd1d02a
)
hammer2 - make gcm IV counter endian-agnostic
author
Alex Hornung <ahornung@gmail.com>
Thu, 9 Aug 2012 19:55:55 +0000 (20:55 +0100)
committer
Alex Hornung <ahornung@gmail.com>
Thu, 9 Aug 2012 19:55:55 +0000 (20:55 +0100)
sbin/hammer2/crypto.c
patch
|
blob
|
blame
|
history
diff --git
a/sbin/hammer2/crypto.c
b/sbin/hammer2/crypto.c
index
79463e8
..
43be4ac
100644
(file)
--- a/
sbin/hammer2/crypto.c
+++ b/
sbin/hammer2/crypto.c
@@
-35,6
+35,7
@@
*/
#include "hammer2.h"
+#include <sys/endian.h>
/*
* Setup crypto for pthreads
@@
-169,7
+170,7
@@
_gcm_iv_increment(char *iv)
* XXX: this should ideally be an atomic update, but we don't have
* an atomic_fetchadd_64 for i386 yet
*/
- *c = (*c)+1;
+ *c = htobe64(be64toh(*c)+1);
/*
* Detect wrap-around, which means it is time to renegotiate