Commit bb23b338 authored by Steven Fackler's avatar Steven Fackler
Browse files

Fix signature of EVP_DigestVerifyFinal on 1.0.1

parent 6ae47248
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -504,6 +504,11 @@ extern {
                                type_: *const EVP_MD,
                                e: *mut ENGINE,
                                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,
                                 sigret: *const c_uchar,
                                 siglen: size_t) -> c_int;
+3 −1
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@ use std::sync::{Mutex, MutexGuard};
use std::sync::{Once, ONCE_INIT};
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)]
pub struct stack_st_ASN1_OBJECT {
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ impl<'a> Verifier<'a> {
    pub fn finish(&self, signature: &[u8]) -> Result<(), ErrorStack> {
        unsafe {
            try_ssl_if!(ffi::EVP_DigestVerifyFinal(self.0,
                                                   signature.as_ptr() as *const _,
                                                   signature.as_ptr() as *const _ as _,
                                                   signature.len()) != 1);
            Ok(())
        }