Ensure Signer::len has documentation

Applied conditional compilation to internal helpers
This commit is contained in:
Sebastian Sturm 2019-09-08 14:45:06 +02:00
parent bdede43afe
commit cf9978bc0e
1 changed files with 6 additions and 2 deletions

View File

@ -279,8 +279,12 @@ impl<'a> Signer<'a> {
/// OpenSSL documentation at [`EVP_DigestSignFinal`]. /// OpenSSL documentation at [`EVP_DigestSignFinal`].
/// ///
/// [`EVP_DigestSignFinal`]: https://www.openssl.org/docs/man1.1.0/crypto/EVP_DigestSignFinal.html /// [`EVP_DigestSignFinal`]: https://www.openssl.org/docs/man1.1.0/crypto/EVP_DigestSignFinal.html
#[cfg(not(ossl111))]
pub fn len(&self) -> Result<usize, ErrorStack> { pub fn len(&self) -> Result<usize, ErrorStack> {
self.len_intern()
}
#[cfg(not(ossl111))]
fn len_intern(&self) -> Result<usize, ErrorStack> {
unsafe { unsafe {
let mut len = 0; let mut len = 0;
cvt(ffi::EVP_DigestSignFinal( cvt(ffi::EVP_DigestSignFinal(
@ -293,7 +297,7 @@ impl<'a> Signer<'a> {
} }
#[cfg(ossl111)] #[cfg(ossl111)]
pub fn len(&self) -> Result<usize, ErrorStack> { fn len_intern(&self) -> Result<usize, ErrorStack> {
unsafe { unsafe {
let mut len = 0; let mut len = 0;
cvt(ffi::EVP_DigestSign( cvt(ffi::EVP_DigestSign(