Public keys are not always present
This commit is contained in:
parent
0d0b5080e2
commit
3d31539ba9
|
|
@ -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());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue