Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rust Openssl
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public Repositories
Rust Openssl
Commits
cb3e9411
Commit
cb3e9411
authored
4 years ago
by
Steven Fackler
Browse files
Options
Downloads
Patches
Plain Diff
fix function names
parent
136abc02
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
openssl-sys/src/evp.rs
+94
-15
94 additions, 15 deletions
openssl-sys/src/evp.rs
with
94 additions
and
15 deletions
openssl-sys/src/evp.rs
+
94
−
15
View file @
cb3e9411
...
...
@@ -29,6 +29,48 @@ pub unsafe fn EVP_get_digestbynid(type_: c_int) -> *const EVP_MD {
EVP_get_digestbyname
(
OBJ_nid2sn
(
type_
))
}
cfg_if!
{
if
#[cfg(ossl300)]
{
extern
"C"
{
pub
fn
EVP_MD_get_size
(
md
:
*
const
EVP_MD
)
->
c_int
;
pub
fn
EVP_MD_get_type
(
md
:
*
const
EVP_MD
)
->
c_int
;
pub
fn
EVP_CIPHER_get_key_length
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
pub
fn
EVP_CIPHER_get_block_size
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
pub
fn
EVP_CIPHER_get_iv_length
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
pub
fn
EVP_CIPHER_get_nid
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
}
#[inline]
pub
unsafe
fn
EVP_MD_size
(
md
:
*
const
EVP_MD
)
->
c_int
{
EVP_MD_get_size
(
md
)
}
#[inline]
pub
unsafe
fn
EVP_MD_type
(
md
:
*
const
EVP_MD
)
->
c_int
{
EVP_MD_get_type
(
md
)
}
#[inline]
pub
unsafe
fn
EVP_CIPHER_key_length
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
{
EVP_CIPHER_get_key_length
(
cipher
)
}
#[inline]
pub
unsafe
fn
EVP_CIPHER_block_size
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
{
EVP_CIPHER_get_block_size
(
cipher
)
}
#[inline]
pub
unsafe
fn
EVP_CIPHER_iv_length
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
{
EVP_CIPHER_get_iv_length
(
cipher
)
}
#[inline]
pub
unsafe
fn
EVP_CIPHER_nid
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
{
EVP_CIPHER_get_nid
(
cipher
)
}
}
else
{
extern
"C"
{
pub
fn
EVP_MD_size
(
md
:
*
const
EVP_MD
)
->
c_int
;
pub
fn
EVP_MD_type
(
md
:
*
const
EVP_MD
)
->
c_int
;
...
...
@@ -38,6 +80,9 @@ extern "C" {
pub
fn
EVP_CIPHER_iv_length
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
pub
fn
EVP_CIPHER_nid
(
cipher
:
*
const
EVP_CIPHER
)
->
c_int
;
}
}
}
extern
"C"
{}
cfg_if!
{
if
#[cfg(ossl110)]
{
...
...
@@ -185,11 +230,24 @@ extern "C" {
outl
:
*
mut
c_int
,
)
->
c_int
;
}
cfg_if!
{
if
#[cfg(ossl300)]
{
extern
"C"
{
pub
fn
EVP_PKEY_get_size
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
;
}
#[inline]
pub
fn
EVP_PKEY_size
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
{
EVP_PKEY_get_size
(
pkey
)
}
}
else
{
const_ptr_api!
{
extern
"C"
{
pub
fn
EVP_PKEY_size
(
pkey
:
#[const_ptr_if(any(ossl111b,
libressl280))]
EVP_PKEY
)
->
c_int
;
}
}
}
}
cfg_if!
{
if
#[cfg(ossl111)]
{
extern
"C"
{
...
...
@@ -311,7 +369,26 @@ extern "C" {
pub
fn
EVP_get_digestbyname
(
name
:
*
const
c_char
)
->
*
const
EVP_MD
;
pub
fn
EVP_get_cipherbyname
(
name
:
*
const
c_char
)
->
*
const
EVP_CIPHER
;
}
cfg_if!
{
if
#[cfg(ossl300)]
{
extern
"C"
{
pub
fn
EVP_PKEY_get_id
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
;
pub
fn
EVP_PKEY_get_bits
(
key
:
*
const
EVP_PKEY
)
->
c_int
;
}
#[inline]
pub
unsafe
fn
EVP_PKEY_id
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
{
EVP_PKEY_get_id
(
pkey
)
}
#[inline]
pub
unsafe
fn
EVP_PKEY_bits
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
{
EVP_PKEY_get_bits
(
pkey
)
}
}
else
{
extern
"C"
{
pub
fn
EVP_PKEY_id
(
pkey
:
*
const
EVP_PKEY
)
->
c_int
;
}
const_ptr_api!
{
...
...
@@ -319,6 +396,8 @@ const_ptr_api! {
pub
fn
EVP_PKEY_bits
(
key
:
#[const_ptr_if(any(ossl110,
libressl280))]
EVP_PKEY
)
->
c_int
;
}
}
}
}
extern
"C"
{
pub
fn
EVP_PKEY_assign
(
pkey
:
*
mut
EVP_PKEY
,
typ
:
c_int
,
key
:
*
mut
c_void
)
->
c_int
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment