aboutsummaryrefslogtreecommitdiff
path: root/src/ssl/mod.rs
diff options
context:
space:
mode:
authorValerii Hiora <[email protected]>2014-10-07 14:54:35 +0300
committerValerii Hiora <[email protected]>2014-10-07 14:54:35 +0300
commit41287f3b146c3b5b5c2a706eac7d436dac060864 (patch)
tree76c77f5ab3fa71deef73d8f4425b3409d44d7a5b /src/ssl/mod.rs
parentMerge pull request #60 from vhbit/cert-gen-cleanup (diff)
downloadrust-openssl-41287f3b146c3b5b5c2a706eac7d436dac060864.tar.xz
rust-openssl-41287f3b146c3b5b5c2a706eac7d436dac060864.zip
Using `Path`s instead of plain strings
Refs #45
Diffstat (limited to 'src/ssl/mod.rs')
-rw-r--r--src/ssl/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs
index c7c024ed..b37d3142 100644
--- a/src/ssl/mod.rs
+++ b/src/ssl/mod.rs
@@ -248,7 +248,7 @@ impl SslContext {
#[allow(non_snake_case)]
/// Specifies the file that contains trusted CA certificates.
- pub fn set_CA_file(&mut self, file: &str) -> Option<SslError> {
+ pub fn set_CA_file(&mut self, file: &Path) -> Option<SslError> {
wrap_ssl_result(file.with_c_str(|file| {
unsafe {
ffi::SSL_CTX_load_verify_locations(self.ctx, file, ptr::null())
@@ -257,7 +257,7 @@ impl SslContext {
}
/// Specifies the file that is client certificate
- pub fn set_certificate_file(&mut self, file: &str,
+ pub fn set_certificate_file(&mut self, file: &Path,
file_type: X509FileType) -> Option<SslError> {
wrap_ssl_result(file.with_c_str(|file| {
unsafe {
@@ -267,7 +267,7 @@ impl SslContext {
}
/// Specifies the file that is client private key
- pub fn set_private_key_file(&mut self, file: &str,
+ pub fn set_private_key_file(&mut self, file: &Path,
file_type: X509FileType) -> Option<SslError> {
wrap_ssl_result(file.with_c_str(|file| {
unsafe {