From dbeac560aa111c9fb71e2c9993d59f264c3c0bd7 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Wed, 26 Sep 2001 15:14:10 +0000 Subject: [PATCH] Fixes. --- crypto/engine/hw_openbsd_dev_crypto.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crypto/engine/hw_openbsd_dev_crypto.c b/crypto/engine/hw_openbsd_dev_crypto.c index e3c51d18d7..083fbc5007 100644 --- a/crypto/engine/hw_openbsd_dev_crypto.c +++ b/crypto/engine/hw_openbsd_dev_crypto.c @@ -62,6 +62,8 @@ static void *dummy=&dummy; #include #include #include +#include +#include #include #include #include @@ -78,8 +80,8 @@ static int dev_crypto_ciphers(ENGINE *e, const EVP_CIPHER **cipher, static int dev_crypto_digests(ENGINE *e, const EVP_MD **digest, const int **nids, int nid); -static const char *dev_crypto_id = "openbsd_dev_crypto"; -static const char *dev_crypto_name = "OpenBSD /dev/crypto"; +static const char dev_crypto_id[] = "openbsd_dev_crypto"; +static const char dev_crypto_name[] = "OpenBSD /dev/crypto"; static ENGINE *engine_openbsd_dev_crypto(void) { @@ -176,6 +178,7 @@ static int dev_crypto_init(session_op *ses) static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx) { + fprintf(stderr,"cleanup %d\n",CDATA(ctx)->ses); if(ioctl(fd,CIOCFSESSION,&CDATA(ctx)->ses) == -1) err("CIOCFSESSION failed"); @@ -325,11 +328,13 @@ static int dev_crypto_init_digest(MD_DATA *md_data,int mac) err("CIOCGSESSION failed"); return 0; } + fprintf(stderr,"opened %d\n",md_data->sess.ses); return 1; } static int dev_crypto_cleanup_digest(MD_DATA *md_data) { + fprintf(stderr,"cleanup %d\n",md_data->sess.ses); if (ioctl(fd,CIOCFSESSION,&md_data->sess.ses) == -1) { err("CIOCFSESSION failed"); -- 2.34.1