Update to nightly: explicit Copy trait

This commit is contained in:
Valerii Hiora 2014-12-11 13:44:37 +02:00
parent ae9e2b1e25
commit c922090075
7 changed files with 18 additions and 3 deletions

View File

@ -39,6 +39,7 @@ pub type X509_NAME_ENTRY = c_void;
pub type X509_REQ = c_void;
pub type X509_STORE_CTX = c_void;
#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct EVP_MD_CTX {
digest: *mut EVP_MD,
@ -49,6 +50,7 @@ pub struct EVP_MD_CTX {
update: *mut c_void
}
#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct HMAC_CTX {
md: *mut EVP_MD,
@ -59,6 +61,7 @@ pub struct HMAC_CTX {
key: [c_uchar, ..128]
}
#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct X509V3_CTX {
flags: c_int,
@ -72,6 +75,7 @@ pub struct X509V3_CTX {
// Maybe more here
}
#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct BIGNUM {
pub d: *mut c_void,

View File

@ -7,6 +7,7 @@ use ssl::error::SslError;
pub struct BigNum(*mut ffi::BIGNUM);
#[deriving(Copy)]
#[repr(C)]
pub enum RNGProperty {
MsbMaybeZero = -1,

View File

@ -4,6 +4,7 @@ use std::io;
use ffi;
#[deriving(Copy)]
pub enum HashType {
MD5,
SHA1,

View File

@ -6,7 +6,7 @@ use crypto::hash::HashType;
use ffi;
use ssl::error::{SslError, StreamError};
#[deriving(Copy)]
enum Parts {
Neither,
Public,
@ -14,6 +14,7 @@ enum Parts {
}
/// Represents a role an asymmetric key might be appropriate for.
#[deriving(Copy)]
pub enum Role {
Encrypt,
Decrypt,
@ -22,6 +23,7 @@ pub enum Role {
}
/// Type of encryption padding to use.
#[deriving(Copy)]
pub enum EncryptionPadding {
OAEP,
PKCS1v15

View File

@ -2,12 +2,14 @@ use libc::{c_int};
use ffi;
#[deriving(Copy)]
pub enum Mode {
Encrypt,
Decrypt,
}
#[allow(non_camel_case_types)]
#[deriving(Copy)]
pub enum Type {
AES_128_ECB,
AES_128_CBC,

View File

@ -33,6 +33,7 @@ fn init() {
/// Determines the SSL method supported
#[deriving(Show, Hash, PartialEq, Eq)]
#[allow(non_camel_case_types)]
#[deriving(Copy)]
pub enum SslMethod {
#[cfg(feature = "sslv2")]
/// Only support the SSLv2 protocol, requires `feature="sslv2"`
@ -68,6 +69,7 @@ impl SslMethod {
}
/// Determines the type of certificate verification used
#[deriving(Copy)]
#[repr(i32)]
pub enum SslVerifyMode {
/// Verify that the server's certificate is trusted

View File

@ -15,6 +15,7 @@ use ssl::error::{SslError, StreamError};
#[cfg(test)]
mod tests;
#[deriving(Copy)]
#[repr(i32)]
pub enum X509FileType {
PEM = ffi::X509_FILETYPE_PEM,
@ -22,6 +23,7 @@ pub enum X509FileType {
Default = ffi::X509_FILETYPE_DEFAULT
}
#[allow(missing_copy_implementations)]
pub struct X509StoreContext {
ctx: *mut ffi::X509_STORE_CTX
}
@ -54,7 +56,7 @@ trait AsStr<'a> {
fn as_str(&self) -> &'a str;
}
#[deriving(Clone)]
#[deriving(Clone, Copy)]
pub enum KeyUsage {
DigitalSignature,
NonRepudiation,
@ -84,7 +86,7 @@ impl AsStr<'static> for KeyUsage {
}
#[deriving(Clone)]
#[deriving(Clone, Copy)]
pub enum ExtKeyUsage {
ServerAuth,
ClientAuth,
@ -430,6 +432,7 @@ pub struct X509Name<'x> {
macro_rules! make_validation_error(
($ok_val:ident, $($name:ident = $val:ident,)+) => (
#[deriving(Copy)]
pub enum X509ValidationError {
$($name,)+
X509UnknownError(c_int)