Home
last modified time | relevance | path

Searched refs:ffi (Results 1 – 25 of 417) sorted by relevance

12345678910>>...17

/third_party/rust/crates/rust-openssl/openssl/src/
Dnid.rs4 use std::ffi::CStr;
5 use std::ffi::CString;
68 ffi::init(); in create()
72 let raw = ffi::OBJ_create(oid.as_ptr(), sn.as_ptr(), ln.as_ptr()); in create()
73 if raw == ffi::NID_undef { in create()
90 if ffi::OBJ_find_sigid_algs(self.0, &mut digest, &mut pkey) == 1 { in signature_algorithms()
106 cvt_p(ffi::OBJ_nid2ln(self.0) as *mut c_char) in long_name()
116 cvt_p(ffi::OBJ_nid2sn(self.0) as *mut c_char) in short_name()
121 pub const UNDEF: Nid = Nid(ffi::NID_undef);
122 pub const ITU_T: Nid = Nid(ffi::NID_itu_t);
[all …]
Docsp.rs19 const NO_CERTS = ffi::OCSP_NOCERTS;
20 const NO_INTERN = ffi::OCSP_NOINTERN;
21 const NO_CHAIN = ffi::OCSP_NOCHAIN;
22 const NO_VERIFY = ffi::OCSP_NOVERIFY;
23 const NO_EXPLICIT = ffi::OCSP_NOEXPLICIT;
24 const NO_CA_SIGN = ffi::OCSP_NOCASIGN;
25 const NO_DELEGATED = ffi::OCSP_NODELEGATED;
26 const NO_CHECKS = ffi::OCSP_NOCHECKS;
27 const TRUST_OTHER = ffi::OCSP_TRUSTOTHER;
28 const RESPID_KEY = ffi::OCSP_RESPID_KEY;
[all …]
Dcipher.rs14 use std::ffi::CString;
20 use ffi::{EVP_CIPHER_block_size, EVP_CIPHER_iv_length, EVP_CIPHER_key_length};
25 pub unsafe fn EVP_CIPHER_iv_length(ptr: *const ffi::EVP_CIPHER) -> c_int {
30 pub unsafe fn EVP_CIPHER_block_size(ptr: *const ffi::EVP_CIPHER) -> c_int {
35 pub unsafe fn EVP_CIPHER_key_length(ptr: *const ffi::EVP_CIPHER) -> c_int {
46 type Inner = *mut ffi::EVP_CIPHER;
52 ffi::EVP_CIPHER_free(self.as_ptr());
58 type CType = ffi::EVP_CIPHER;
107 let ptr = ffi::EVP_get_cipherbyname(ffi::OBJ_nid2sn(nid.as_raw())); in from_nid()
130 let ptr = cvt_p(ffi::EVP_CIPHER_fetch( in fetch()
[all …]
Dasn1.rs32 use std::ffi::CString;
47 type CType = ffi::ASN1_GENERALIZEDTIME;
48 fn drop = ffi::ASN1_GENERALIZEDTIME_free;
75 let print_result = cvt(ffi::ASN1_GENERALIZEDTIME_print( in fmt()
93 pub const EOC: Asn1Type = Asn1Type(ffi::V_ASN1_EOC);
95 pub const BOOLEAN: Asn1Type = Asn1Type(ffi::V_ASN1_BOOLEAN);
97 pub const INTEGER: Asn1Type = Asn1Type(ffi::V_ASN1_INTEGER);
99 pub const BIT_STRING: Asn1Type = Asn1Type(ffi::V_ASN1_BIT_STRING);
101 pub const OCTET_STRING: Asn1Type = Asn1Type(ffi::V_ASN1_OCTET_STRING);
103 pub const NULL: Asn1Type = Asn1Type(ffi::V_ASN1_NULL);
[all …]
Dmd.rs14 use std::ffi::CString;
23 type Inner = *mut ffi::EVP_MD;
29 ffi::EVP_MD_free(self.as_ptr());
35 type CType = ffi::EVP_MD;
84 let ptr = ffi::EVP_get_digestbynid(type_.as_raw()); in from_nid()
107 let ptr = cvt_p(ffi::EVP_MD_fetch( in fetch()
120 unsafe { MdRef::from_ptr(ffi::EVP_md_null() as *mut _) } in null()
125 unsafe { MdRef::from_ptr(ffi::EVP_md5() as *mut _) } in md5()
130 unsafe { MdRef::from_ptr(ffi::EVP_sha1() as *mut _) } in sha1()
135 unsafe { MdRef::from_ptr(ffi::EVP_sha224() as *mut _) } in sha224()
[all …]
Dbn.rs29 use std::ffi::CString;
41 use ffi::{
47 use ffi::BN_is_negative;
49 use ffi::{
61 unsafe fn BN_is_negative(bn: *const ffi::BIGNUM) -> c_int {
85 type CType = ffi::BN_CTX;
86 fn drop = ffi::BN_CTX_free;
107 ffi::init(); in new()
108 cvt_p(ffi::BN_CTX_new()).map(BigNumContext) in new()
117 ffi::init(); in new_secure()
[all …]
Drsa.rs49 pub const NONE: Padding = Padding(ffi::RSA_NO_PADDING);
50 pub const PKCS1: Padding = Padding(ffi::RSA_PKCS1_PADDING);
51 pub const PKCS1_OAEP: Padding = Padding(ffi::RSA_PKCS1_OAEP_PADDING);
52 pub const PKCS1_PSS: Padding = Padding(ffi::RSA_PKCS1_PSS_PADDING);
67 type CType = ffi::RSA;
68 fn drop = ffi::RSA_free;
88 ffi::RSA_up_ref(self.as_ptr()); in to_owned()
109 ffi::PEM_write_bio_RSAPrivateKey
116 ffi::i2d_RSAPrivateKey
136 let len = cvt_n(ffi::RSA_private_decrypt( in private_decrypt()
[all …]
Ddsa.rs23 type CType = ffi::DSA;
24 fn drop = ffi::DSA_free;
75 ffi::DSA_up_ref(self.as_ptr()); in to_owned()
91 ffi::PEM_write_bio_DSA_PUBKEY
98 ffi::i2d_DSA_PUBKEY
127 ffi::PEM_write_bio_DSAPrivateKey
148 unsafe { ffi::DSA_size(self.as_ptr()) as u32 } in size()
197 ffi::init(); in generate()
199 let dsa = Dsa::from_ptr(cvt_p(ffi::DSA_new())?); in generate()
200 cvt(ffi::DSA_generate_parameters_ex( in generate()
[all …]
Dcms.rs24 const TEXT = ffi::CMS_TEXT;
25 const CMS_NOCERTS = ffi::CMS_NOCERTS;
26 const NO_CONTENT_VERIFY = ffi::CMS_NO_CONTENT_VERIFY;
27 const NO_ATTR_VERIFY = ffi::CMS_NO_ATTR_VERIFY;
28 const NOSIGS = ffi::CMS_NOSIGS;
29 const NOINTERN = ffi::CMS_NOINTERN;
30 const NO_SIGNER_CERT_VERIFY = ffi::CMS_NO_SIGNER_CERT_VERIFY;
31 const NOVERIFY = ffi::CMS_NOVERIFY;
32 const DETACHED = ffi::CMS_DETACHED;
33 const BINARY = ffi::CMS_BINARY;
[all …]
Dbio.rs10 pub struct MemBioSlice<'a>(*mut ffi::BIO, PhantomData<&'a [u8]>);
15 ffi::BIO_free_all(self.0); in drop()
22 ffi::init(); in new()
35 pub fn as_ptr(&self) -> *mut ffi::BIO { in as_ptr()
40 pub struct MemBio(*mut ffi::BIO);
45 ffi::BIO_free_all(self.0); in drop()
52 ffi::init(); in new()
54 let bio = unsafe { cvt_p(ffi::BIO_new(ffi::BIO_s_mem()))? }; in new()
58 pub fn as_ptr(&self) -> *mut ffi::BIO { in as_ptr()
65 let len = ffi::BIO_get_mem_data(self.0, &mut ptr); in get_buf()
[all …]
Ddh.rs15 type CType = ffi::DH;
16 fn drop = ffi::DH_free;
33 ffi::PEM_write_bio_DHparams
40 ffi::i2d_DHparams
57 let dh = Dh::from_ptr(cvt_p(ffi::DH_new())?); in from_pqg()
76 cvt(ffi::DH_generate_key(dh_ptr))?; in set_private_key()
86 let dh = Dh::from_ptr(cvt_p(ffi::DH_new())?); in generate_params()
87 cvt(ffi::DH_generate_parameters_ex( in generate_params()
102 cvt(ffi::DH_generate_key(dh_ptr))?; in generate_key()
115 ffi::PEM_read_bio_DHparams
[all …]
Dec.rs41 pub struct PointConversionForm(ffi::point_conversion_form_t);
46 PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_COMPRESSED);
50 PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_UNCOMPRESSED);
54 PointConversionForm(ffi::point_conversion_form_t::POINT_CONVERSION_HYBRID);
87 pub const NAMED_CURVE: Asn1Flag = Asn1Flag(ffi::OPENSSL_EC_NAMED_CURVE);
91 type CType = ffi::EC_GROUP;
92 fn drop = ffi::EC_GROUP_free;
136 cvt_p(ffi::EC_GROUP_new_by_curve_name(nid.as_raw())).map(EcGroup) in from_curve_name()
149 cvt_p(ffi::EC_GROUP_new_curve_GFp( in from_components()
172 cvt(ffi::EC_GROUP_get_curve_GFp( in components_gfp()
[all …]
Dpkey.rs61 use std::ffi::CString;
80 pub const RSA: Id = Id(ffi::EVP_PKEY_RSA);
82 pub const HMAC: Id = Id(ffi::EVP_PKEY_HMAC);
84 pub const CMAC: Id = Id(ffi::EVP_PKEY_CMAC);
85 pub const DSA: Id = Id(ffi::EVP_PKEY_DSA);
86 pub const DH: Id = Id(ffi::EVP_PKEY_DH);
87 pub const EC: Id = Id(ffi::EVP_PKEY_EC);
90 pub const HKDF: Id = Id(ffi::EVP_PKEY_HKDF);
93 pub const ED25519: Id = Id(ffi::EVP_PKEY_ED25519);
95 pub const ED448: Id = Id(ffi::EVP_PKEY_ED448);
[all …]
Dsha.rs54 ffi::SHA1(data.as_ptr(), data.len(), hash.as_mut_ptr() as *mut _);
65 ffi::SHA224(data.as_ptr(), data.len(), hash.as_mut_ptr() as *mut _);
76 ffi::SHA256(data.as_ptr(), data.len(), hash.as_mut_ptr() as *mut _);
87 ffi::SHA384(data.as_ptr(), data.len(), hash.as_mut_ptr() as *mut _);
98 ffi::SHA512(data.as_ptr(), data.len(), hash.as_mut_ptr() as *mut _);
112 pub struct Sha1(ffi::SHA_CTX);
128 ffi::SHA1_Init( ctx.as_mut_ptr());
140 ffi::SHA1_Update(&mut self.0, buf.as_ptr() as *const c_void, buf.len());
150 ffi::SHA1_Final(hash.as_mut_ptr() as *mut _, &mut self.0);
158 pub struct Sha224(ffi::SHA256_CTX);
[all …]
Dencrypt.rs55 pctx: *mut ffi::EVP_PKEY_CTX,
65 ffi::EVP_PKEY_CTX_free(self.pctx); in drop()
81 ffi::init(); in new()
83 let pctx = cvt_p(ffi::EVP_PKEY_CTX_new(pkey.as_ptr(), ptr::null_mut()))?; in new()
84 let r = ffi::EVP_PKEY_encrypt_init(pctx); in new()
86 ffi::EVP_PKEY_CTX_free(pctx); in new()
105 cvt(ffi::EVP_PKEY_CTX_get_rsa_padding(self.pctx, &mut pad)) in rsa_padding()
119 cvt(ffi::EVP_PKEY_CTX_set_rsa_padding( in set_rsa_padding()
136 cvt(ffi::EVP_PKEY_CTX_set_rsa_mgf1_md( in set_rsa_mgf1_md()
154 cvt(ffi::EVP_PKEY_CTX_set_rsa_oaep_md( in set_rsa_oaep_md()
[all …]
/third_party/rust/crates/cxx/tests/
Dtest.rs14 use cxx_test_suite::{cast, ffi, R};
16 use std::ffi::CStr;
37 let shared = ffi::Shared { z: 2020 }; in test_c_return()
38 let ns_shared = ffi::AShared { z: 2020 }; in test_c_return()
39 let nested_ns_shared = ffi::ABShared { z: 2020 }; in test_c_return()
41 assert_eq!(2020, ffi::c_return_primitive()); in test_c_return()
42 assert_eq!(2020, ffi::c_return_shared().z); in test_c_return()
43 assert_eq!(2020, ffi::c_return_box().0); in test_c_return()
44 ffi::c_return_unique_ptr(); in test_c_return()
46 assert_eq!(2020, *ffi::c_return_ref(&shared)); in test_c_return()
[all …]
DBUCK8 ":ffi",
14 name = "ffi",
16 "ffi/cast.rs",
17 "ffi/lib.rs",
18 "ffi/module.rs",
31 "ffi/tests.cc",
37 "ffi/lib.rs.h": ":bridge/header",
38 "ffi/module.rs.h": ":module/header",
39 "ffi/tests.h": "ffi/tests.h",
45 src = "ffi/lib.rs",
[all …]
/third_party/rust/crates/rust-openssl/openssl/src/x509/
Dverify.rs15 const ALWAYS_CHECK_SUBJECT = ffi::X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT;
16 const NO_WILDCARDS = ffi::X509_CHECK_FLAG_NO_WILDCARDS;
17 const NO_PARTIAL_WILDCARDS = ffi::X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS;
18 const MULTI_LABEL_WILDCARDS = ffi::X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS;
19 const SINGLE_LABEL_SUBDOMAINS = ffi::X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS;
22 const NEVER_CHECK_SUBJECT = ffi::X509_CHECK_FLAG_NEVER_CHECK_SUBJECT;
25 const FLAG_NO_WILDCARDS = ffi::X509_CHECK_FLAG_NO_WILDCARDS;
32 const CB_ISSUER_CHECK = ffi::X509_V_FLAG_CB_ISSUER_CHECK;
33 const USE_CHECK_TIME = ffi::X509_V_FLAG_USE_CHECK_TIME;
34 const CRL_CHECK = ffi::X509_V_FLAG_CRL_CHECK;
[all …]
Dmod.rs16 use std::ffi::{CStr, CString};
53 type CType = ffi::X509_STORE_CTX;
54 fn drop = ffi::X509_STORE_CTX_free;
68 unsafe { cvt_n(ffi::SSL_get_ex_data_X509_STORE_CTX_idx()).map(|idx| Index::from_raw(idx)) } in ssl_idx()
75 ffi::init(); in new()
76 cvt_p(ffi::X509_STORE_CTX_new()).map(X509StoreContext) in new()
86 let data = ffi::X509_STORE_CTX_get_ex_data(self.as_ptr(), index.as_raw()); in ex_data()
98 unsafe { X509VerifyResult::from_raw(ffi::X509_STORE_CTX_get_error(self.as_ptr())) } in error()
131 ffi::X509_STORE_CTX_cleanup(self.0.as_ptr()); in init()
137 cvt(ffi::X509_STORE_CTX_init( in init()
[all …]
Dstore.rs58 use std::ffi::CString;
63 type CType = ffi::X509_STORE;
64 fn drop = ffi::X509_STORE_free;
79 ffi::init(); in new()
81 cvt_p(ffi::X509_STORE_new()).map(X509StoreBuilder) in new()
98 unsafe { cvt(ffi::X509_STORE_add_cert(self.as_ptr(), cert.as_ptr())).map(|_| ()) } in add_cert()
108 unsafe { cvt(ffi::X509_STORE_set_default_paths(self.as_ptr())).map(|_| ()) } in set_default_paths()
117 let lookup = unsafe { ffi::X509_STORE_add_lookup(self.as_ptr(), method.as_ptr()) }; in add_lookup()
125 unsafe { cvt(ffi::X509_STORE_set_flags(self.as_ptr(), flags.bits())).map(|_| ()) } in set_flags()
132 unsafe { cvt(ffi::X509_STORE_set_purpose(self.as_ptr(), purpose.as_raw())).map(|_| ()) } in set_purpose()
[all …]
/third_party/rust/crates/rust-openssl/openssl/src/ssl/
Dmod.rs91 use std::ffi::{CStr, CString};
126 ffi::init(); in cipher_name()
129 let ptr = ffi::OPENSSL_cipher_name(s.as_ptr()); in cipher_name()
148 … const DONT_INSERT_EMPTY_FRAGMENTS = ffi::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS as SslOptionsRepr;
152 const ALL = ffi::SSL_OP_ALL as SslOptionsRepr;
157 const NO_QUERY_MTU = ffi::SSL_OP_NO_QUERY_MTU as SslOptionsRepr;
165 const COOKIE_EXCHANGE = ffi::SSL_OP_COOKIE_EXCHANGE as SslOptionsRepr;
168 const NO_TICKET = ffi::SSL_OP_NO_TICKET as SslOptionsRepr;
173 ffi::SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION as SslOptionsRepr;
177 const NO_COMPRESSION = ffi::SSL_OP_NO_COMPRESSION as SslOptionsRepr;
[all …]
/third_party/rust/crates/clap/src/builder/
Dos_str.rs14 pub(crate) fn from_string(name: std::ffi::OsString) -> Self { in from_string()
21 pub(crate) fn from_ref(name: &std::ffi::OsStr) -> Self { in from_ref()
27 pub(crate) fn from_static_ref(name: &'static std::ffi::OsStr) -> Self { in from_static_ref()
34 pub fn as_os_str(&self) -> &std::ffi::OsStr { in as_os_str()
39 pub fn to_os_string(&self) -> std::ffi::OsString { in to_os_string()
54 crate::builder::StrInner::Static(s) => Self::from_static_ref(std::ffi::OsStr::new(s)), in from()
55 crate::builder::StrInner::Owned(s) => Self::from_ref(std::ffi::OsStr::new(s.as_ref())), in from()
63 Self::from_static_ref(std::ffi::OsStr::new(id.into_inner().0)) in from()
71 crate::builder::StrInner::Static(s) => Self::from_static_ref(std::ffi::OsStr::new(s)), in from()
72 crate::builder::StrInner::Owned(s) => Self::from_ref(std::ffi::OsStr::new(s.as_ref())), in from()
[all …]
/third_party/rust/crates/bindgen/bindgen-tests/tests/expectations/tests/
Dcore_ffi_c.rs8 pub type c_char = ::core::ffi::c_char;
9 pub type c_double = ::core::ffi::c_double;
10 pub type c_float = ::core::ffi::c_float;
11 pub type c_int = ::core::ffi::c_int;
12 pub type c_long = ::core::ffi::c_long;
13 pub type c_longlong = ::core::ffi::c_longlong;
14 pub type c_schar = ::core::ffi::c_schar;
15 pub type c_short = ::core::ffi::c_short;
16 pub type c_uchar = ::core::ffi::c_uchar;
17 pub type c_uint = ::core::ffi::c_uint;
[all …]
/third_party/libffi/
Dconfigure.host16 SOURCES="ffi.c sysv.S"
23 SOURCES="ffi.c osf.S"
28 SOURCES="ffi.c arcompact.S"
38 SOURCES="ffi.c sysv.S"
43 SOURCES="ffi.c sysv.S"
48 SOURCES="ffi.c sysv.S"
53 SOURCES="ffi.c sysv.S"
58 SOURCES="ffi.c eabi.S"
63 SOURCES="ffi.c linux.S"
70 SOURCES="ffi.c hpux32.S"
[all …]
DMakefile.am79 EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \
80 src/aarch64/win64_armasm.S src/alpha/ffi.c src/alpha/osf.S \
81 src/arc/ffi.c src/arc/arcompact.S src/arm/ffi.c \
82 src/arm/sysv.S src/arm/ffi.c src/arm/sysv_msvc_arm32.S \
83 src/avr32/ffi.c src/avr32/sysv.S src/bfin/ffi.c \
84 src/bfin/sysv.S src/cris/ffi.c src/cris/sysv.S src/frv/ffi.c \
85 src/frv/eabi.S src/ia64/ffi.c src/ia64/unix.S src/m32r/ffi.c \
86 src/m32r/sysv.S src/m68k/ffi.c src/m68k/sysv.S src/m88k/ffi.c \
87 src/m88k/obsd.S src/metag/ffi.c src/metag/sysv.S \
88 src/microblaze/ffi.c src/microblaze/sysv.S src/mips/ffi.c \
[all …]

12345678910>>...17