diff options
| author | Will Tange <[email protected]> | 2016-01-07 06:28:20 +0100 |
|---|---|---|
| committer | Will Tange <[email protected]> | 2016-01-07 06:33:25 +0100 |
| commit | 89e88727ffab25c49e67415ebc6bca555f6358c6 (patch) | |
| tree | 6ce461b6d9caccca113c0b5b2eb64e7a8e271538 /openssl/src | |
| parent | Update README doc link (diff) | |
| download | rust-openssl-89e88727ffab25c49e67415ebc6bca555f6358c6.tar.xz rust-openssl-89e88727ffab25c49e67415ebc6bca555f6358c6.zip | |
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.
Diffstat (limited to 'openssl/src')
| -rw-r--r-- | openssl/src/crypto/pkey.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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 { |