summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/hw_cryptodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/engine/hw_cryptodev.c')
-rw-r--r--src/lib/libcrypto/engine/hw_cryptodev.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/engine/hw_cryptodev.c b/src/lib/libcrypto/engine/hw_cryptodev.c
index 467c0daa1b..3e7fff1c1e 100644
--- a/src/lib/libcrypto/engine/hw_cryptodev.c
+++ b/src/lib/libcrypto/engine/hw_cryptodev.c
@@ -77,7 +77,7 @@ static int cryptodev_max_iv(int cipher);
77static int cryptodev_key_length_valid(int cipher, int len); 77static int cryptodev_key_length_valid(int cipher, int len);
78static int cipher_nid_to_cryptodev(int nid); 78static int cipher_nid_to_cryptodev(int nid);
79static int get_cryptodev_ciphers(const int **cnids); 79static int get_cryptodev_ciphers(const int **cnids);
80static int get_cryptodev_digests(const int **cnids); 80/*static int get_cryptodev_digests(const int **cnids);*/
81static int cryptodev_usable_ciphers(const int **nids); 81static int cryptodev_usable_ciphers(const int **nids);
82static int cryptodev_usable_digests(const int **nids); 82static int cryptodev_usable_digests(const int **nids);
83static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 83static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
@@ -137,6 +137,7 @@ static struct {
137 { 0, NID_undef, 0, 0, }, 137 { 0, NID_undef, 0, 0, },
138}; 138};
139 139
140#if 0 /* UNUSED */
140static struct { 141static struct {
141 int id; 142 int id;
142 int nid; 143 int nid;
@@ -149,6 +150,7 @@ static struct {
149 { CRYPTO_SHA1, NID_undef, }, 150 { CRYPTO_SHA1, NID_undef, },
150 { 0, NID_undef, }, 151 { 0, NID_undef, },
151}; 152};
153#endif
152 154
153/* 155/*
154 * Return a fd if /dev/crypto seems usable, 0 otherwise. 156 * Return a fd if /dev/crypto seems usable, 0 otherwise.
@@ -258,7 +260,7 @@ get_cryptodev_ciphers(const int **cnids)
258 int fd, i, count = 0; 260 int fd, i, count = 0;
259 261
260 if ((fd = get_dev_crypto()) < 0) { 262 if ((fd = get_dev_crypto()) < 0) {
261 *nids = NULL; 263 *cnids = NULL;
262 return (0); 264 return (0);
263 } 265 }
264 memset(&sess, 0, sizeof(sess)); 266 memset(&sess, 0, sizeof(sess));
@@ -289,6 +291,7 @@ get_cryptodev_ciphers(const int **cnids)
289 * returning them here is harmless, as long as we return NULL 291 * returning them here is harmless, as long as we return NULL
290 * when asked for a handler in the cryptodev_engine_digests routine 292 * when asked for a handler in the cryptodev_engine_digests routine
291 */ 293 */
294#if 0 /* UNUSED */
292static int 295static int
293get_cryptodev_digests(const int **cnids) 296get_cryptodev_digests(const int **cnids)
294{ 297{
@@ -297,7 +300,7 @@ get_cryptodev_digests(const int **cnids)
297 int fd, i, count = 0; 300 int fd, i, count = 0;
298 301
299 if ((fd = get_dev_crypto()) < 0) { 302 if ((fd = get_dev_crypto()) < 0) {
300 *nids = NULL; 303 *cnids = NULL;
301 return (0); 304 return (0);
302 } 305 }
303 memset(&sess, 0, sizeof(sess)); 306 memset(&sess, 0, sizeof(sess));
@@ -318,6 +321,7 @@ get_cryptodev_digests(const int **cnids)
318 *cnids = NULL; 321 *cnids = NULL;
319 return (count); 322 return (count);
320} 323}
324#endif
321 325
322/* 326/*
323 * Find the useable ciphers|digests from dev/crypto - this is the first 327 * Find the useable ciphers|digests from dev/crypto - this is the first
@@ -623,7 +627,7 @@ static int
623bn2crparam(const BIGNUM *a, struct crparam *crp) 627bn2crparam(const BIGNUM *a, struct crparam *crp)
624{ 628{
625 int i, j, k; 629 int i, j, k;
626 ssize_t words, bytes, bits; 630 ssize_t bytes, bits;
627 u_char *b; 631 u_char *b;
628 632
629 crp->crp_p = NULL; 633 crp->crp_p = NULL;