Docs for pkcs12

This commit is contained in:
Steven Fackler 2016-08-14 11:24:18 -07:00
parent e5299fd7c9
commit e6c4135c53
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ impl Drop for Pkcs12 {
} }
impl Pkcs12 { impl Pkcs12 {
/// Deserializes a `Pkcs12` structure from DER-encoded data.
pub fn from_der(der: &[u8]) -> Result<Pkcs12, ErrorStack> { pub fn from_der(der: &[u8]) -> Result<Pkcs12, ErrorStack> {
unsafe { unsafe {
ffi::init(); ffi::init();
@ -30,6 +31,7 @@ impl Pkcs12 {
} }
} }
/// Extracts the contents of the `Pkcs12`.
pub fn parse(&self, pass: &str) -> Result<ParsedPkcs12, ErrorStack> { pub fn parse(&self, pass: &str) -> Result<ParsedPkcs12, ErrorStack> {
unsafe { unsafe {
let pass = CString::new(pass).unwrap(); let pass = CString::new(pass).unwrap();