summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/engine/hw_cryptodev.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2002-06-11 12:26:02 +0000
committerbeck <beck@openbsd.org>2002-06-11 12:26:02 +0000
commitf076ebc813f433c03d93f2dadc2ddbb5e5487226 (patch)
treef602ae3d05571c01e4e031cd413aea0ac4a722a6 /lib/libcrypto/engine/hw_cryptodev.c
parentMake asymmetric crypto work in userland (diff)
downloadwireguard-openbsd-f076ebc813f433c03d93f2dadc2ddbb5e5487226.tar.xz
wireguard-openbsd-f076ebc813f433c03d93f2dadc2ddbb5e5487226.zip
Make DSA work now... at least for things that can do bn_mod_exp.
Diffstat (limited to 'lib/libcrypto/engine/hw_cryptodev.c')
-rw-r--r--lib/libcrypto/engine/hw_cryptodev.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c
index 8f55798421d..8eea1935a67 100644
--- a/lib/libcrypto/engine/hw_cryptodev.c
+++ b/lib/libcrypto/engine/hw_cryptodev.c
@@ -809,6 +809,7 @@ cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa)
goto err;
}
+ printf("bar\n");
memset(&kop, 0, sizeof kop);
kop.crk_op = CRK_DSA_SIGN;
@@ -849,6 +850,7 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen,
struct crypt_kop kop;
int dsaret = 1;
+ printf("foo\n");
memset(&kop, 0, sizeof kop);
kop.crk_op = CRK_DSA_VERIFY;
@@ -1021,14 +1023,10 @@ ENGINE_load_cryptodev(void)
}
}
-#if 0
- /* dsa is currently busted. */
if (ENGINE_set_DSA(engine, &cryptodev_dsa)) {
const DSA_METHOD *meth = DSA_OpenSSL();
-
- cryptodev_dsa.dsa_do_sign = meth->dsa_do_sign;
- cryptodev_dsa.dsa_do_verify = meth->dsa_do_verify;
- cryptodev_dsa.bn_mod_exp = meth->bn_mod_exp;
+
+ memcpy(&cryptodev_dsa, meth, sizeof(DSA_METHOD));
if (cryptodev_asymfeat & CRF_DSA_SIGN)
cryptodev_dsa.dsa_do_sign = cryptodev_dsa_do_sign;
if (cryptodev_asymfeat & CRF_DSA_VERIFY)
@@ -1036,7 +1034,6 @@ ENGINE_load_cryptodev(void)
if (cryptodev_asymfeat & CRF_MOD_EXP)
cryptodev_dsa.bn_mod_exp = cryptodev_dsa_bn_mod_exp;
}
-#endif
if (ENGINE_set_DH(engine, &cryptodev_dh)){