Public keys are not always present

This commit is contained in:
Steven Fackler 2016-11-13 20:31:44 +00:00
parent 0d0b5080e2
commit 3d31539ba9
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ impl EcKeyRef {
} }
} }
pub fn public_key(&self) -> &EcPointRef { pub fn public_key(&self) -> Option<&EcPointRef> {
unsafe { unsafe {
let ptr = ffi::EC_KEY_get0_public_key(self.as_ptr()); let ptr = ffi::EC_KEY_get0_public_key(self.as_ptr());
assert!(!ptr.is_null()); assert!(!ptr.is_null());