diff options
| author | Steven Fackler <[email protected]> | 2018-03-09 22:14:50 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-03-09 22:14:50 -0800 |
| commit | 245f5f3a11f9ef7a18131b0341d329089a29b3e1 (patch) | |
| tree | fb45c306e04fa677d95e00614eb0a8917f53cfa8 /openssl/src/sign.rs | |
| parent | Remove the x509 module-level example (diff) | |
| download | rust-openssl-245f5f3a11f9ef7a18131b0341d329089a29b3e1.tar.xz rust-openssl-245f5f3a11f9ef7a18131b0341d329089a29b3e1.zip | |
Impl Sync and Send for various types
Closes #865
Diffstat (limited to 'openssl/src/sign.rs')
| -rw-r--r-- | openssl/src/sign.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openssl/src/sign.rs b/openssl/src/sign.rs index a61d883b..8911a69a 100644 --- a/openssl/src/sign.rs +++ b/openssl/src/sign.rs @@ -85,6 +85,9 @@ pub struct Signer<'a> { _p: PhantomData<&'a ()>, } +unsafe impl<'a> Sync for Signer<'a> {} +unsafe impl<'a> Send for Signer<'a> {} + impl<'a> Drop for Signer<'a> { fn drop(&mut self) { // pkey_ctx is owned by the md_ctx, so no need to explicitly free it. @@ -244,6 +247,9 @@ pub struct Verifier<'a> { pkey_pd: PhantomData<&'a ()>, } +unsafe impl<'a> Sync for Verifier<'a> {} +unsafe impl<'a> Send for Verifier<'a> {} + impl<'a> Drop for Verifier<'a> { fn drop(&mut self) { // pkey_ctx is owned by the md_ctx, so no need to explicitly free it. |