summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/engine/hw_cryptodev.c4
-rw-r--r--src/lib/libssl/src/crypto/engine/hw_cryptodev.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c
index 6ac2f9be30..d6d78da9b2 100644
--- a/src/lib/libcrypto/engine/hw_cryptodev.c
+++ b/src/lib/libcrypto/engine/hw_cryptodev.c
@@ -238,7 +238,7 @@ cipher_nid_to_cryptodev(int nid)
238static int 238static int
239get_cryptodev_ciphers(const int **cnids) 239get_cryptodev_ciphers(const int **cnids)
240{ 240{
241 static int nids[CRYPTO_ALGORITHM_MAX]; 241 static int nids[CRYPTO_ALGORITHM_MAX + CRYPTO_VIAC3_MAX + 1];
242 struct session_op sess; 242 struct session_op sess;
243 int fd, i, count = 0; 243 int fd, i, count = 0;
244 244
@@ -249,7 +249,7 @@ get_cryptodev_ciphers(const int **cnids)
249 memset(&sess, 0, sizeof(sess)); 249 memset(&sess, 0, sizeof(sess));
250 sess.key = (caddr_t)"123456781234567812345678"; 250 sess.key = (caddr_t)"123456781234567812345678";
251 251
252 for (i = 0; ciphers[i].c_id && count < CRYPTO_ALGORITHM_MAX; i++) { 252 for (i = 0; ciphers[i].c_id && count <= CRYPTO_ALGORITHM_MAX; i++) {
253 if (ciphers[i].c_nid == NID_undef) 253 if (ciphers[i].c_nid == NID_undef)
254 continue; 254 continue;
255 sess.cipher = ciphers[i].c_id; 255 sess.cipher = ciphers[i].c_id;
diff --git a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
index 6ac2f9be30..d6d78da9b2 100644
--- a/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
+++ b/src/lib/libssl/src/crypto/engine/hw_cryptodev.c
@@ -238,7 +238,7 @@ cipher_nid_to_cryptodev(int nid)
238static int 238static int
239get_cryptodev_ciphers(const int **cnids) 239get_cryptodev_ciphers(const int **cnids)
240{ 240{
241 static int nids[CRYPTO_ALGORITHM_MAX]; 241 static int nids[CRYPTO_ALGORITHM_MAX + CRYPTO_VIAC3_MAX + 1];
242 struct session_op sess; 242 struct session_op sess;
243 int fd, i, count = 0; 243 int fd, i, count = 0;
244 244
@@ -249,7 +249,7 @@ get_cryptodev_ciphers(const int **cnids)
249 memset(&sess, 0, sizeof(sess)); 249 memset(&sess, 0, sizeof(sess));
250 sess.key = (caddr_t)"123456781234567812345678"; 250 sess.key = (caddr_t)"123456781234567812345678";
251 251
252 for (i = 0; ciphers[i].c_id && count < CRYPTO_ALGORITHM_MAX; i++) { 252 for (i = 0; ciphers[i].c_id && count <= CRYPTO_ALGORITHM_MAX; i++) {
253 if (ciphers[i].c_nid == NID_undef) 253 if (ciphers[i].c_nid == NID_undef)
254 continue; 254 continue;
255 sess.cipher = ciphers[i].c_id; 255 sess.cipher = ciphers[i].c_id;