Module Name:    src
Committed By:   drochner
Date:           Thu Feb  3 19:44:05 UTC 2011

Modified Files:
        src/crypto/external/bsd/openssl/dist/crypto/engine: eng_cryptodev.c

Log Message:
fix some merge botch and enable cryptodev support on NetBSD again


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
    src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c:1.3 src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c:1.4
--- src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c:1.3	Wed Aug  5 18:38:21 2009
+++ src/crypto/external/bsd/openssl/dist/crypto/engine/eng_cryptodev.c	Thu Feb  3 19:44:05 2011
@@ -33,7 +33,7 @@
 #include <openssl/bn.h>
 
 #if (defined(__unix__) || defined(unix)) && !defined(USG) && \
-	(defined(OpenBSD) || defined(__FreeBSD__))
+	(defined(OpenBSD) || defined(__FreeBSD__)) || defined(__NetBSD__)
 #include <sys/param.h>
 # if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) || defined(__NetBSD__)
 #  define HAVE_CRYPTODEV
@@ -193,8 +193,6 @@
 	static int fd = -1;
 
 	if (fd == -1)
-		fd = get_dev_crypto();
-	if (fd == -1)
 		fd = open_dev_crypto();
 	return fd;
 }
@@ -910,7 +908,7 @@
 		return (-1);
 
 	for (i = 0; i < bytes; i++)
-		pd[i] = crp->crp_p[bytes - i - 1];
+		pd[i] = ((char *)crp->crp_p)[bytes - i - 1];
 
 	BN_bin2bn(pd, bytes, a);
 	free(pd);
@@ -936,7 +934,7 @@
 {
 	int fd, ret = -1;
 
-	if ((fd = get_asym_dev_crypto()) < 0)
+	if ((fd = get_dev_crypto()) < 0)
 		return (ret);
 
 	if (r) {

Reply via email to