aboutsummaryrefslogtreecommitdiff
path: root/security/openssl/files/patch-crypto_evp_openbsd__hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/openssl/files/patch-crypto_evp_openbsd__hw.c')
-rw-r--r--security/openssl/files/patch-crypto_evp_openbsd__hw.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/security/openssl/files/patch-crypto_evp_openbsd__hw.c b/security/openssl/files/patch-crypto_evp_openbsd__hw.c
new file mode 100644
index 000000000000..6705e0545fbb
--- /dev/null
+++ b/security/openssl/files/patch-crypto_evp_openbsd__hw.c
@@ -0,0 +1,14 @@
+--- crypto/evp/openbsd_hw.c.orig 2015-03-19 13:19:00 UTC
++++ crypto/evp/openbsd_hw.c
+@@ -108,7 +108,10 @@ static int dev_crypto_init(session_op *s
+ dev_failed = 1;
+ return 0;
+ }
+- close(cryptodev_fd);
++ if (fd == -1)
++ fd = cryptodev_fd;
++ else
++ close(cryptodev_fd);
+ }
+ assert(ses);
+ memset(ses, '\0', sizeof *ses);