aboutsummaryrefslogtreecommitdiff
path: root/src/ssl
diff options
context:
space:
mode:
authorValerii Hiora <[email protected]>2015-01-03 16:42:58 +0200
committerValerii Hiora <[email protected]>2015-01-03 16:42:58 +0200
commitcf028e971a11f7ab0a5ab2c01daa03d559db1322 (patch)
tree7d7d52e3e7542c7cea656ea69e7a05d10c4ab7b4 /src/ssl
parentMerge pull request #134 from DiamondLovesYou/master (diff)
downloadrust-openssl-cf028e971a11f7ab0a5ab2c01daa03d559db1322.tar.xz
rust-openssl-cf028e971a11f7ab0a5ab2c01daa03d559db1322.zip
Updated to master:
- library stab issues - deriving -> derive - {mod} -> {self}
Diffstat (limited to 'src/ssl')
-rw-r--r--src/ssl/error.rs4
-rw-r--r--src/ssl/mod.rs12
2 files changed, 9 insertions, 7 deletions
diff --git a/src/ssl/error.rs b/src/ssl/error.rs
index 7e8daef1..888a9cdc 100644
--- a/src/ssl/error.rs
+++ b/src/ssl/error.rs
@@ -9,7 +9,7 @@ use std::c_str::CString;
use ffi;
/// An SSL error
-#[deriving(Show, Clone, PartialEq, Eq)]
+#[derive(Show, Clone, PartialEq, Eq)]
pub enum SslError {
/// The underlying stream reported an error
StreamError(IoError),
@@ -37,7 +37,7 @@ impl error::Error for SslError {
}
/// An error from the OpenSSL library
-#[deriving(Show, Clone, PartialEq, Eq)]
+#[derive(Show, Clone, PartialEq, Eq)]
pub enum OpensslError {
/// An unknown error
UnknownError {
diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs
index 1bd36147..3a19f643 100644
--- a/src/ssl/mod.rs
+++ b/src/ssl/mod.rs
@@ -1,6 +1,8 @@
use libc::{c_int, c_void, c_long};
+use std::c_str::ToCStr;
use std::io::{IoResult, IoError, EndOfFile, Stream, Reader, Writer};
use std::mem;
+use std::num::FromPrimitive;
use std::ptr;
use std::sync::{Once, ONCE_INIT, Arc};
@@ -31,9 +33,9 @@ fn init() {
}
/// Determines the SSL method supported
-#[deriving(Show, Hash, PartialEq, Eq)]
+#[derive(Show, Hash, PartialEq, Eq)]
#[allow(non_camel_case_types)]
-#[deriving(Copy)]
+#[derive(Copy)]
pub enum SslMethod {
#[cfg(feature = "sslv2")]
/// Only support the SSLv2 protocol, requires `feature="sslv2"`
@@ -69,7 +71,7 @@ impl SslMethod {
}
/// Determines the type of certificate verification used
-#[deriving(Copy)]
+#[derive(Copy)]
#[repr(i32)]
pub enum SslVerifyMode {
/// Verify that the server's certificate is trusted
@@ -389,7 +391,7 @@ impl Ssl {
}
-#[deriving(FromPrimitive, Show)]
+#[derive(FromPrimitive, Show)]
#[repr(i32)]
enum LibSslError {
ErrorNone = ffi::SSL_ERROR_NONE,
@@ -404,7 +406,7 @@ enum LibSslError {
}
/// A stream wrapper which handles SSL encryption for an underlying stream.
-#[deriving(Clone)]
+#[derive(Clone)]
pub struct SslStream<S> {
stream: S,
ssl: Arc<Ssl>,