Types and accessor for SslSession
This commit is contained in:
parent
1ffe574298
commit
88a7032f4b
|
|
@ -1334,6 +1334,11 @@ impl SslRef {
|
||||||
pub fn verify_result(&self) -> Option<X509VerifyError> {
|
pub fn verify_result(&self) -> Option<X509VerifyError> {
|
||||||
unsafe { X509VerifyError::from_raw(ffi::SSL_get_verify_result(self.as_ptr())) }
|
unsafe { X509VerifyError::from_raw(ffi::SSL_get_verify_result(self.as_ptr())) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the SSL session.
|
||||||
|
pub fn session(&self) -> &SslSessionRef {
|
||||||
|
unsafe { SslSessionRef::from_ptr(ffi::SSL_get_session(self.as_ptr())) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe impl Sync for Ssl {}
|
unsafe impl Sync for Ssl {}
|
||||||
|
|
@ -1345,6 +1350,8 @@ impl fmt::Debug for Ssl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type_!(SslSession, SslSessionRef, ffi::SSL_SESSION, ffi::SSL_SESSION_free);
|
||||||
|
|
||||||
impl Ssl {
|
impl Ssl {
|
||||||
pub fn new(ctx: &SslContext) -> Result<Ssl, ErrorStack> {
|
pub fn new(ctx: &SslContext) -> Result<Ssl, ErrorStack> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue