Skip to content

Commit 6761dbb

Browse files
authored
Merge pull request #8637 from philljj/register_ecdsa
linuxkm: register ecdsa.
2 parents 16a6818 + 35f8c3b commit 6761dbb

5 files changed

Lines changed: 839 additions & 0 deletions

File tree

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9399,6 +9399,9 @@ then
93999399
'ofb(aes)') test "$ENABLED_AESOFB" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-OFB implementation not enabled.])
94009400
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESOFB" ;;
94019401
'ecb(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESECB -DHAVE_AES_ECB" ;;
9402+
'ecdsa') test "$ENABLED_ECC" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: ECDSA implementation not enabled.])
9403+
AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_ECDSA" ;;
9404+
# disable options
94029405
'-cbc(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESCBC" ;;
94039406
'-cfb(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESCFB" ;;
94049407
'-gcm(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESGCM" ;;
@@ -9408,6 +9411,7 @@ then
94089411
'-ctr(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESCTR" ;;
94099412
'-ofb(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESOFB" ;;
94109413
'-ecb(aes)') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_AESECB" ;;
9414+
'-ecdsa') AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_DONT_REGISTER_ECDSA" ;;
94119415
*) AC_MSG_ERROR([Unsupported LKCAPI algorithm "$lkcapi_alg".]) ;;
94129416
esac
94139417
done

linuxkm/include.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ EXTRA_DIST += m4/ax_linuxkm.m4 \
1414
linuxkm/linuxkm_memory.c \
1515
linuxkm/linuxkm_wc_port.h \
1616
linuxkm/lkcapi_glue.c \
17+
linuxkm/lkcapi_ecdsa_glue.c \
1718
linuxkm/x86_vector_register_glue.c

linuxkm/linuxkm_wc_port.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@
289289
#include <crypto/internal/aead.h>
290290
#include <crypto/internal/skcipher.h>
291291

292+
#if defined(HAVE_ECC) && \
293+
(defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
294+
defined(LINUXKM_LKCAPI_REGISTER_ECDSA))
295+
#include <crypto/internal/akcipher.h>
296+
#endif /* HAVE_ECC && (REGISTER_ALL || REGISTER_ECDSA) */
297+
292298
/* the LKCAPI assumes that expanded encrypt and decrypt keys will stay
293299
* loaded simultaneously, and the Linux in-tree implementations have two
294300
* AES key structs in each context, one for each direction. in

0 commit comments

Comments
 (0)