Fix signature of EVP_DigestVerifyFinal on 1.0.1
This commit is contained in:
parent
6ae472487f
commit
bb23b33829
|
|
@ -504,6 +504,11 @@ extern {
|
||||||
type_: *const EVP_MD,
|
type_: *const EVP_MD,
|
||||||
e: *mut ENGINE,
|
e: *mut ENGINE,
|
||||||
pkey: *mut EVP_PKEY) -> c_int;
|
pkey: *mut EVP_PKEY) -> c_int;
|
||||||
|
#[cfg(ossl101)]
|
||||||
|
pub fn EVP_DigestVerifyFinal(ctx: *mut EVP_MD_CTX,
|
||||||
|
sigret: *mut c_uchar,
|
||||||
|
siglen: size_t) -> c_int;
|
||||||
|
#[cfg(not(ossl101))]
|
||||||
pub fn EVP_DigestVerifyFinal(ctx: *mut EVP_MD_CTX,
|
pub fn EVP_DigestVerifyFinal(ctx: *mut EVP_MD_CTX,
|
||||||
sigret: *const c_uchar,
|
sigret: *const c_uchar,
|
||||||
siglen: size_t) -> c_int;
|
siglen: size_t) -> c_int;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@ use std::sync::{Mutex, MutexGuard};
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::{Once, ONCE_INIT};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong, time_t};
|
use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong};
|
||||||
|
#[cfg(not(ossl101))]
|
||||||
|
use libc::time_t;
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct stack_st_ASN1_OBJECT {
|
pub struct stack_st_ASN1_OBJECT {
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ impl<'a> Verifier<'a> {
|
||||||
pub fn finish(&self, signature: &[u8]) -> Result<(), ErrorStack> {
|
pub fn finish(&self, signature: &[u8]) -> Result<(), ErrorStack> {
|
||||||
unsafe {
|
unsafe {
|
||||||
try_ssl_if!(ffi::EVP_DigestVerifyFinal(self.0,
|
try_ssl_if!(ffi::EVP_DigestVerifyFinal(self.0,
|
||||||
signature.as_ptr() as *const _,
|
signature.as_ptr() as *const _ as _,
|
||||||
signature.len()) != 1);
|
signature.len()) != 1);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue