diff options
author | 2004-06-15 23:41:49 +0000 | |
---|---|---|
committer | 2004-06-15 23:41:49 +0000 | |
commit | d082fb6c86a49b809d076d30e278763962a8c5d6 (patch) | |
tree | 3f1999cedee9fcebbc92405ee55a2511525352ed /lib/libssl/src | |
parent | first parts of how C3 Esther will be handled; ok tom (diff) | |
download | wireguard-openbsd-d082fb6c86a49b809d076d30e278763962a8c5d6.tar.xz wireguard-openbsd-d082fb6c86a49b809d076d30e278763962a8c5d6.zip |
machdep.xcrypt now has a different meaning: Instead of > 0 indicating
that AES is there, we now have 3 flag bits: C3_HAS_AES, C3_HAS_SHA
(SHA1 & SHA256), and C3_HAS_MM (RSA). Change this code to only look
at C3_HAS_AES for now.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/engine/hw_cryptodev.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/libssl/src/crypto/engine/hw_cryptodev.c b/lib/libssl/src/crypto/engine/hw_cryptodev.c index 21de0a9fdd0..d12d23d9fc2 100644 --- a/lib/libssl/src/crypto/engine/hw_cryptodev.c +++ b/lib/libssl/src/crypto/engine/hw_cryptodev.c @@ -744,20 +744,22 @@ check_viac3aes(void) if (value == 0) return (0); - cryptodev_aes_128_cbc.init = xcrypt_init_key; - cryptodev_aes_128_cbc.do_cipher = xcrypt_cipher; - cryptodev_aes_128_cbc.cleanup = xcrypt_cleanup; - cryptodev_aes_128_cbc.ctx_size = sizeof(AES_KEY); - - cryptodev_aes_192_cbc.init = xcrypt_init_key; - cryptodev_aes_192_cbc.do_cipher = xcrypt_cipher; - cryptodev_aes_192_cbc.cleanup = xcrypt_cleanup; - cryptodev_aes_192_cbc.ctx_size = sizeof(AES_KEY); - - cryptodev_aes_256_cbc.init = xcrypt_init_key; - cryptodev_aes_256_cbc.do_cipher = xcrypt_cipher; - cryptodev_aes_256_cbc.cleanup = xcrypt_cleanup; - cryptodev_aes_256_cbc.ctx_size = sizeof(AES_KEY); + if (value & C3_HAS_AES) { + cryptodev_aes_128_cbc.init = xcrypt_init_key; + cryptodev_aes_128_cbc.do_cipher = xcrypt_cipher; + cryptodev_aes_128_cbc.cleanup = xcrypt_cleanup; + cryptodev_aes_128_cbc.ctx_size = sizeof(AES_KEY); + + cryptodev_aes_192_cbc.init = xcrypt_init_key; + cryptodev_aes_192_cbc.do_cipher = xcrypt_cipher; + cryptodev_aes_192_cbc.cleanup = xcrypt_cleanup; + cryptodev_aes_192_cbc.ctx_size = sizeof(AES_KEY); + + cryptodev_aes_256_cbc.init = xcrypt_init_key; + cryptodev_aes_256_cbc.do_cipher = xcrypt_cipher; + cryptodev_aes_256_cbc.cleanup = xcrypt_cleanup; + cryptodev_aes_256_cbc.ctx_size = sizeof(AES_KEY); + } return (value); } #endif /* __i386__ */ |