diff options
author | 2010-06-30 17:11:05 +0000 | |
---|---|---|
committer | 2010-06-30 17:11:05 +0000 | |
commit | 7e7f8cee0824fe1e5e95706421508825e5fd6a73 (patch) | |
tree | cc090bf314d4c3bc497c5b61eff41736934da84c | |
parent | remove two useless defines. (diff) | |
download | wireguard-openbsd-7e7f8cee0824fe1e5e95706421508825e5fd6a73.tar.xz wireguard-openbsd-7e7f8cee0824fe1e5e95706421508825e5fd6a73.zip |
get rid of a few c++ comments and a few spacing nits
-rw-r--r-- | sys/arch/amd64/amd64/aesni.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/aesni.c b/sys/arch/amd64/amd64/aesni.c index 57a33b5dd06..3eb8aa1fedd 100644 --- a/sys/arch/amd64/amd64/aesni.c +++ b/sys/arch/amd64/amd64/aesni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aesni.c,v 1.2 2010/06/30 17:00:42 thib Exp $ */ +/* $OpenBSD: aesni.c,v 1.3 2010/06/30 17:11:05 thib Exp $ */ /*- * Copyright (c) 2003 Jason Wright * Copyright (c) 2003, 2004 Theo de Raadt @@ -59,7 +59,6 @@ struct aesni_sess { struct aesni_softc { uint8_t op_buf[16384]; int32_t sc_cid; -// uint32_t sc_nsessions; LIST_HEAD(, aesni_sess) sc_sessions; } *aesni_sc; @@ -67,14 +66,17 @@ uint32_t aesni_nsessions, aesni_ops; /* assembler-assisted key setup */ extern void aesni_set_key(struct aesni_sess *ses, uint8_t *key, size_t len); + /* aes encryption/decryption */ extern void aesni_enc(struct aesni_sess *ses, uint8_t *dst, uint8_t *src); extern void aesni_dec(struct aesni_sess *ses, uint8_t *dst, uint8_t *src); + /* assembler-assisted CBC mode */ extern void aesni_cbc_enc(struct aesni_sess *ses, uint8_t *dst, uint8_t *src, size_t len, uint8_t *iv); extern void aesni_cbc_dec(struct aesni_sess *ses, uint8_t *dst, uint8_t *src, size_t len, uint8_t *iv); + /* assembler-assisted CTR mode */ extern void aesni_ctr_enc(struct aesni_sess *ses, uint8_t *dst, uint8_t *src, size_t len, uint8_t *iv); @@ -94,8 +96,7 @@ void aesni_setup(void) { int algs[CRYPTO_ALGORITHM_MAX + 1]; -// int flags = CRYPTOCAP_F_SOFTWARE; - int flags = 0; /* XXX TESTING */ + int flags = 0; /* CRYPTOCAP_F_SOFTWARE */ aesni_sc = malloc(sizeof(*aesni_sc), M_DEVBUF, M_NOWAIT|M_ZERO); if (aesni_sc == NULL) |