Update to rust master
This commit is contained in:
parent
f664444ac5
commit
5a80cc8aae
|
|
@ -1,4 +1,6 @@
|
||||||
extern crate "pkg-config" as pkg_config;
|
#![feature(convert)]
|
||||||
|
|
||||||
|
extern crate pkg_config;
|
||||||
extern crate gcc;
|
extern crate gcc;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
@ -36,7 +38,7 @@ fn main() {
|
||||||
let mut include_dirs = vec![];
|
let mut include_dirs = vec![];
|
||||||
|
|
||||||
if let Some(include_dir) = include_dir {
|
if let Some(include_dir) = include_dir {
|
||||||
include_dirs.push(PathBuf::new(&include_dir));
|
include_dirs.push(PathBuf::from(&include_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
build_old_openssl_shim(&include_dirs);
|
build_old_openssl_shim(&include_dirs);
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")]
|
#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")]
|
||||||
|
#![feature(convert)]
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
||||||
#[cfg(target_os = "nacl")]
|
#[cfg(target_os = "nacl")]
|
||||||
extern crate "libressl-pnacl-sys" as _for_linkage;
|
extern crate libressl_pnacl_sys;
|
||||||
|
|
||||||
use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t};
|
use libc::{c_void, c_int, c_char, c_ulong, c_long, c_uint, c_uchar, size_t};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ pub fn find_certs_dirs() -> Vec<PathBuf> {
|
||||||
"/etc/openssl",
|
"/etc/openssl",
|
||||||
"/etc/pki/tls",
|
"/etc/pki/tls",
|
||||||
"/etc/ssl",
|
"/etc/ssl",
|
||||||
].iter().map(|s| PathBuf::new(*s)).filter(|p| {
|
].iter().map(|s| PathBuf::from(*s)).filter(|p| {
|
||||||
fs::metadata(p).is_ok()
|
fs::metadata(p).is_ok()
|
||||||
}).collect()
|
}).collect()
|
||||||
}
|
}
|
||||||
|
|
@ -51,8 +51,8 @@ pub fn init_ssl_cert_env_vars() {
|
||||||
|
|
||||||
pub fn probe() -> ProbeResult {
|
pub fn probe() -> ProbeResult {
|
||||||
let mut result = ProbeResult {
|
let mut result = ProbeResult {
|
||||||
cert_file: env::var_os("SSL_CERT_FILE").map(|s| PathBuf::new(&s)),
|
cert_file: env::var_os("SSL_CERT_FILE").map(PathBuf::from),
|
||||||
cert_dir: env::var_os("SSL_CERT_DIR").map(|s| PathBuf::new(&s)),
|
cert_dir: env::var_os("SSL_CERT_DIR").map(PathBuf::from),
|
||||||
};
|
};
|
||||||
for certs_dir in find_certs_dirs().iter() {
|
for certs_dir in find_certs_dirs().iter() {
|
||||||
// cert.pem looks to be an openssl 1.0.1 thing, while
|
// cert.pem looks to be an openssl 1.0.1 thing, while
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ extern crate bitflags;
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate "rustc-serialize" as serialize;
|
extern crate rustc_serialize as serialize;
|
||||||
|
|
||||||
extern crate "openssl-sys" as ffi;
|
extern crate openssl_sys as ffi;
|
||||||
|
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue