Commit 89e88727 authored by Will Tange's avatar Will Tange
Browse files

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.
parent 84c1880e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 {