From 89e88727ffab25c49e67415ebc6bca555f6358c6 Mon Sep 17 00:00:00 2001 From: Will Tange Date: Thu, 7 Jan 2016 06:28:20 +0100 Subject: [PATCH] Mark PKey as `Send` and `Sync` Provided that the locking function is set, the underlying `ffi::EVP_KEY` type should be safe to use across threads. --- openssl/src/crypto/pkey.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openssl/src/crypto/pkey.rs b/openssl/src/crypto/pkey.rs index 10891224..e7aa4c8c 100644 --- a/openssl/src/crypto/pkey.rs +++ b/openssl/src/crypto/pkey.rs @@ -57,6 +57,9 @@ pub struct PKey { parts: Parts, } +unsafe impl Send for PKey {} +unsafe impl Sync for PKey {} + /// Represents a public key, optionally with a private key attached. impl PKey { pub fn new() -> PKey {