diff options
| author | Brian Chin <[email protected]> | 2017-01-30 16:51:10 -0800 |
|---|---|---|
| committer | Brian Chin <[email protected]> | 2017-01-30 16:51:10 -0800 |
| commit | 302ee77d32acb0b92fe563f29c36882e3b9b7d62 (patch) | |
| tree | d67728147befc2ffe837ea106c9f83c7337ebbd4 /openssl-sys/src | |
| parent | Fixing typo (diff) | |
| download | rust-openssl-302ee77d32acb0b92fe563f29c36882e3b9b7d62.tar.xz rust-openssl-302ee77d32acb0b92fe563f29c36882e3b9b7d62.zip | |
Adding suggestions from review.
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 9f89762b..1859c3ba 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1310,6 +1310,15 @@ pub unsafe fn BIO_set_retry_write(b: *mut BIO) { BIO_set_flags(b, BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY) } +// EVP_PKEY_CTX_ctrl macros +pub unsafe fn EVP_PKEY_CTX_set_rsa_padding(ctx: *mut EVP_PKEY_CTX, pad: c_int) -> c_int { + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, RSA_PKEY_CTRL_RSA_PADDING, pad, ptr::null_mut()) +} + +pub unsafe fn EVP_PKEY_CTX_get_rsa_padding(ctx: *mut EVP_PKEY_CTX, ppad: *mut c_int) -> c_int { + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, RSA_PKEY_CTRL_GET_RSA_PADDING, 0, ppad as *mut c_void) +} + pub unsafe fn SSL_CTX_set_mode(ctx: *mut SSL_CTX, op: c_long) -> c_long { SSL_CTX_ctrl(ctx, SSL_CTRL_MODE, op, ptr::null_mut()) } |