aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-05-13 15:53:49 +0100
committerGitHub <[email protected]>2018-05-13 15:53:49 +0100
commit53671518fd597db4ea3d9feba52b810f31408d91 (patch)
treedd009945cfdb22b0b35054c8d1b5e842b07485a3 /openssl-sys/src
parentMerge pull request #918 from sfackler/rsa-clone (diff)
parentGate away CMS_KEY_PARAM from OpenSSL 1.0.1 (diff)
downloadrust-openssl-53671518fd597db4ea3d9feba52b810f31408d91.tar.xz
rust-openssl-53671518fd597db4ea3d9feba52b810f31408d91.zip
Merge pull request #902 from ur0/CMS_sign
Add the CMS_sign and i2d_CMS_ContentInfo function bindings
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs55
1 files changed, 55 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index 887359ae..9b49e21b 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -1465,6 +1465,51 @@ pub const GEN_RID: c_int = 8;
pub const DTLS1_COOKIE_LENGTH: c_uint = 256;
+#[cfg(not(libressl))]
+pub const CMS_TEXT: c_uint = 0x1;
+#[cfg(not(libressl))]
+pub const CMS_NOCERTS: c_uint = 0x2;
+#[cfg(not(libressl))]
+pub const CMS_NO_CONTENT_VERIFY: c_uint = 0x4;
+#[cfg(not(libressl))]
+pub const CMS_NO_ATTR_VERIFY: c_uint = 0x8;
+#[cfg(not(libressl))]
+pub const CMS_NOSIGS: c_uint = 0x4 | 0x8;
+#[cfg(not(libressl))]
+pub const CMS_NOINTERN: c_uint = 0x10;
+#[cfg(not(libressl))]
+pub const CMS_NO_SIGNER_CERT_VERIFY: c_uint = 0x20;
+#[cfg(not(libressl))]
+pub const CMS_NOVERIFY: c_uint = 0x20;
+#[cfg(not(libressl))]
+pub const CMS_DETACHED: c_uint = 0x40;
+#[cfg(not(libressl))]
+pub const CMS_BINARY: c_uint = 0x80;
+#[cfg(not(libressl))]
+pub const CMS_NOATTR: c_uint = 0x100;
+#[cfg(not(libressl))]
+pub const CMS_NOSMIMECAP: c_uint = 0x200;
+#[cfg(not(libressl))]
+pub const CMS_NOOLDMIMETYPE: c_uint = 0x400;
+#[cfg(not(libressl))]
+pub const CMS_CRLFEOL: c_uint = 0x800;
+#[cfg(not(libressl))]
+pub const CMS_STREAM: c_uint = 0x1000;
+#[cfg(not(libressl))]
+pub const CMS_NOCRL: c_uint = 0x2000;
+#[cfg(not(libressl))]
+pub const CMS_PARTIAL: c_uint = 0x4000;
+#[cfg(not(libressl))]
+pub const CMS_REUSE_DIGEST: c_uint = 0x8000;
+#[cfg(not(libressl))]
+pub const CMS_USE_KEYID: c_uint = 0x10000;
+#[cfg(not(libressl))]
+pub const CMS_DEBUG_DECRYPT: c_uint = 0x20000;
+#[cfg(all(not(libressl), not(ossl101)))]
+pub const CMS_KEY_PARAM: c_uint = 0x40000;
+#[cfg(all(not(libressl), not(ossl101), not(ossl102)))]
+pub const CMS_ASCIICRLF: c_uint = 0x80000;
+
// macros
pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long {
BIO_ctrl(b, BIO_CTRL_INFO, 0, pp as *mut c_void)
@@ -2856,6 +2901,16 @@ extern "C" {
pub fn SMIME_read_CMS(bio: *mut BIO, bcont: *mut *mut BIO) -> *mut CMS_ContentInfo;
#[cfg(not(libressl))]
pub fn CMS_ContentInfo_free(cms: *mut CMS_ContentInfo);
+ #[cfg(not(libressl))]
+ pub fn CMS_sign(
+ signcert: *mut X509,
+ pkey: *mut EVP_PKEY,
+ certs: *mut stack_st_X509,
+ data: *mut BIO,
+ flags: c_uint,
+ ) -> *mut CMS_ContentInfo;
+ #[cfg(not(libressl))]
+ pub fn i2d_CMS_ContentInfo(a: *mut CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int;
#[cfg(not(libressl))]
pub fn FIPS_mode_set(onoff: c_int) -> c_int;