Index: Mk/Uses/cargo.mk =================================================================== --- Mk/Uses/cargo.mk +++ Mk/Uses/cargo.mk @@ -46,7 +46,7 @@ CARGO_BUILDDEP?= yes .if ${CARGO_BUILDDEP:tl} == "yes" -BUILD_DEPENDS+= rust>=1.30.0:lang/rust +BUILD_DEPENDS+= rust>=1.31.0:lang/rust .endif # Location of cargo binary (default to lang/rust's Cargo binary) Index: devel/racer/Makefile =================================================================== --- devel/racer/Makefile +++ devel/racer/Makefile @@ -4,6 +4,7 @@ PORTNAME= racer DISTVERSIONPREFIX= v DISTVERSION= 2.1.14 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= beyert@cs.ucr.edu @@ -55,20 +56,24 @@ lazy_static-1.2.0 \ lazycell-1.2.0 \ libc-0.2.44 \ + lock_api-0.1.5 \ log-0.4.6 \ memchr-2.1.1 \ memoffset-0.2.1 \ nodrop-0.1.13 \ num_cpus-1.8.0 \ - owning_ref-0.3.3 \ - parking_lot-0.5.5 \ + owning_ref-0.4.0 \ + parking_lot-0.6.4 \ parking_lot_core-0.2.14 \ + parking_lot_core-0.3.1 \ proc-macro2-0.4.24 \ quick-error-1.2.2 \ quote-0.6.10 \ rand-0.4.3 \ + rand-0.5.5 \ rand-0.6.1 \ rand_chacha-0.1.0 \ + rand_core-0.2.2 \ rand_core-0.3.0 \ rand_hc-0.1.0 \ rand_isaac-0.1.1 \ @@ -80,14 +85,15 @@ regex-syntax-0.6.3 \ remove_dir_all-0.5.1 \ rls-span-0.4.0 \ - rustc-ap-arena-237.0.0 \ - rustc-ap-rustc_cratesio_shim-237.0.0 \ - rustc-ap-rustc_data_structures-237.0.0 \ - rustc-ap-rustc_errors-237.0.0 \ - rustc-ap-rustc_target-237.0.0 \ - rustc-ap-serialize-237.0.0 \ - rustc-ap-syntax-237.0.0 \ - rustc-ap-syntax_pos-237.0.0 \ + rustc-ap-arena-297.0.0 \ + rustc-ap-graphviz-297.0.0 \ + rustc-ap-rustc_cratesio_shim-297.0.0 \ + rustc-ap-rustc_data_structures-297.0.0 \ + rustc-ap-rustc_errors-297.0.0 \ + rustc-ap-rustc_target-297.0.0 \ + rustc-ap-serialize-297.0.0 \ + rustc-ap-syntax-297.0.0 \ + rustc-ap-syntax_pos-297.0.0 \ rustc-hash-1.0.1 \ rustc-rayon-0.1.1 \ rustc-rayon-core-0.1.1 \ @@ -105,7 +111,6 @@ strsim-0.7.0 \ syn-0.15.22 \ tempfile-3.0.5 \ - termcolor-0.3.6 \ termcolor-1.0.4 \ termion-1.5.1 \ textwrap-0.10.0 \ @@ -122,7 +127,6 @@ winapi-i686-pc-windows-gnu-0.4.0 \ winapi-util-0.1.1 \ winapi-x86_64-pc-windows-gnu-0.4.0 \ - wincolor-0.1.6 \ wincolor-1.0.1 .include Index: devel/racer/distinfo =================================================================== --- devel/racer/distinfo +++ devel/racer/distinfo @@ -45,6 +45,8 @@ SIZE (rust/crates/lazycell-1.2.0.tar.gz) = 11259 SHA256 (rust/crates/libc-0.2.44.tar.gz) = 10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311 SIZE (rust/crates/libc-0.2.44.tar.gz) = 347920 +SHA256 (rust/crates/lock_api-0.1.5.tar.gz) = 62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c +SIZE (rust/crates/lock_api-0.1.5.tar.gz) = 16967 SHA256 (rust/crates/log-0.4.6.tar.gz) = c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6 SIZE (rust/crates/log-0.4.6.tar.gz) = 22303 SHA256 (rust/crates/memchr-2.1.1.tar.gz) = 0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16 @@ -55,12 +57,14 @@ SIZE (rust/crates/nodrop-0.1.13.tar.gz) = 7508 SHA256 (rust/crates/num_cpus-1.8.0.tar.gz) = c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30 SIZE (rust/crates/num_cpus-1.8.0.tar.gz) = 10539 -SHA256 (rust/crates/owning_ref-0.3.3.tar.gz) = cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37 -SIZE (rust/crates/owning_ref-0.3.3.tar.gz) = 11710 -SHA256 (rust/crates/parking_lot-0.5.5.tar.gz) = d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac -SIZE (rust/crates/parking_lot-0.5.5.tar.gz) = 36889 +SHA256 (rust/crates/owning_ref-0.4.0.tar.gz) = 49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13 +SIZE (rust/crates/owning_ref-0.4.0.tar.gz) = 12233 +SHA256 (rust/crates/parking_lot-0.6.4.tar.gz) = f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5 +SIZE (rust/crates/parking_lot-0.6.4.tar.gz) = 31890 SHA256 (rust/crates/parking_lot_core-0.2.14.tar.gz) = 4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa SIZE (rust/crates/parking_lot_core-0.2.14.tar.gz) = 22140 +SHA256 (rust/crates/parking_lot_core-0.3.1.tar.gz) = ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c +SIZE (rust/crates/parking_lot_core-0.3.1.tar.gz) = 26635 SHA256 (rust/crates/proc-macro2-0.4.24.tar.gz) = 77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09 SIZE (rust/crates/proc-macro2-0.4.24.tar.gz) = 30970 SHA256 (rust/crates/quick-error-1.2.2.tar.gz) = 9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0 @@ -69,10 +73,14 @@ SIZE (rust/crates/quote-0.6.10.tar.gz) = 15795 SHA256 (rust/crates/rand-0.4.3.tar.gz) = 8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd SIZE (rust/crates/rand-0.4.3.tar.gz) = 76094 +SHA256 (rust/crates/rand-0.5.5.tar.gz) = e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c +SIZE (rust/crates/rand-0.5.5.tar.gz) = 137359 SHA256 (rust/crates/rand-0.6.1.tar.gz) = ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a SIZE (rust/crates/rand-0.6.1.tar.gz) = 126613 SHA256 (rust/crates/rand_chacha-0.1.0.tar.gz) = 771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a SIZE (rust/crates/rand_chacha-0.1.0.tar.gz) = 11637 +SHA256 (rust/crates/rand_core-0.2.2.tar.gz) = 1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372 +SIZE (rust/crates/rand_core-0.2.2.tar.gz) = 15450 SHA256 (rust/crates/rand_core-0.3.0.tar.gz) = 0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db SIZE (rust/crates/rand_core-0.3.0.tar.gz) = 20581 SHA256 (rust/crates/rand_hc-0.1.0.tar.gz) = 7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4 @@ -95,22 +103,24 @@ SIZE (rust/crates/remove_dir_all-0.5.1.tar.gz) = 8726 SHA256 (rust/crates/rls-span-0.4.0.tar.gz) = 5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a SIZE (rust/crates/rls-span-0.4.0.tar.gz) = 3191 -SHA256 (rust/crates/rustc-ap-arena-237.0.0.tar.gz) = 2d24c8b3c1437fad023cb9472381216a1d41d82dbb2d2e6c7858bd6f50317719 -SIZE (rust/crates/rustc-ap-arena-237.0.0.tar.gz) = 5622 -SHA256 (rust/crates/rustc-ap-rustc_cratesio_shim-237.0.0.tar.gz) = 9c5b02c76cd1ee4e9c97c8228701796d6b7431e8f100dea2d8af1d6c2c2bad56 -SIZE (rust/crates/rustc-ap-rustc_cratesio_shim-237.0.0.tar.gz) = 1218 -SHA256 (rust/crates/rustc-ap-rustc_data_structures-237.0.0.tar.gz) = 4076388154497fb9a007e3badd78e415402a5594111cd6bc7ce1420dd1b1818b -SIZE (rust/crates/rustc-ap-rustc_data_structures-237.0.0.tar.gz) = 78061 -SHA256 (rust/crates/rustc-ap-rustc_errors-237.0.0.tar.gz) = c6c11e4789cbc276ceaa87d326c234b1a2d1e0fe6017b88a8a25903200060acb -SIZE (rust/crates/rustc-ap-rustc_errors-237.0.0.tar.gz) = 28998 -SHA256 (rust/crates/rustc-ap-rustc_target-237.0.0.tar.gz) = 25f711bb152b9d7cdd69410cfe6d99aeb1409c959e0fdf3c8ca4d220e568aa52 -SIZE (rust/crates/rustc-ap-rustc_target-237.0.0.tar.gz) = 56229 -SHA256 (rust/crates/rustc-ap-serialize-237.0.0.tar.gz) = 57638db658d4942d3f30a12566836f9a67a636ed8002c8cae1c9231214e39929 -SIZE (rust/crates/rustc-ap-serialize-237.0.0.tar.gz) = 35119 -SHA256 (rust/crates/rustc-ap-syntax-237.0.0.tar.gz) = d6dbcf07abf7a9957dce8d34353d55dfb4cd882153181f24349f4690facb58f0 -SIZE (rust/crates/rustc-ap-syntax-237.0.0.tar.gz) = 319171 -SHA256 (rust/crates/rustc-ap-syntax_pos-237.0.0.tar.gz) = 0915cb5e166cabe588a129dec2d47357077e96fb1f9b57318fbe217eac4ce508 -SIZE (rust/crates/rustc-ap-syntax_pos-237.0.0.tar.gz) = 28022 +SHA256 (rust/crates/rustc-ap-arena-297.0.0.tar.gz) = b69fd4a0e8a3ecd99b497965d05f6f04dd2e4601a6146a841dbe4c8e77c2b30c +SIZE (rust/crates/rustc-ap-arena-297.0.0.tar.gz) = 5651 +SHA256 (rust/crates/rustc-ap-graphviz-297.0.0.tar.gz) = f8136418dbc491bab74aa0565eaa2086754a7a81a5e74a1d84d6168d18e889e7 +SIZE (rust/crates/rustc-ap-graphviz-297.0.0.tar.gz) = 10192 +SHA256 (rust/crates/rustc-ap-rustc_cratesio_shim-297.0.0.tar.gz) = a972feda82332d1d05b1ba5a097e915cd9c9c8f1af2bd7b08af09fb88c753d5f +SIZE (rust/crates/rustc-ap-rustc_cratesio_shim-297.0.0.tar.gz) = 1230 +SHA256 (rust/crates/rustc-ap-rustc_data_structures-297.0.0.tar.gz) = 582584c6c48b0ece4b8aef3f9bb59d94d17c5665612bc87a71f509e45a3113b5 +SIZE (rust/crates/rustc-ap-rustc_data_structures-297.0.0.tar.gz) = 77574 +SHA256 (rust/crates/rustc-ap-rustc_errors-297.0.0.tar.gz) = cd852096944d0ac6af1aefa9639a2ae6dede217606ce97f88ff0dcc8c86d6ff6 +SIZE (rust/crates/rustc-ap-rustc_errors-297.0.0.tar.gz) = 29674 +SHA256 (rust/crates/rustc-ap-rustc_target-297.0.0.tar.gz) = 98301a272ecfeec29d2d4e97b07238707c2b89d86fc3a4a5f31a00728f14e288 +SIZE (rust/crates/rustc-ap-rustc_target-297.0.0.tar.gz) = 57064 +SHA256 (rust/crates/rustc-ap-serialize-297.0.0.tar.gz) = c8f13510e617e2e322e3297038fd6a7346f2297124af9e10e33a627c5d544e9d +SIZE (rust/crates/rustc-ap-serialize-297.0.0.tar.gz) = 35223 +SHA256 (rust/crates/rustc-ap-syntax-297.0.0.tar.gz) = 0792f5a9ccfc5ec13bb5b0472fa49e145481029c39f6bf5b1a36decc99c3328f +SIZE (rust/crates/rustc-ap-syntax-297.0.0.tar.gz) = 323639 +SHA256 (rust/crates/rustc-ap-syntax_pos-297.0.0.tar.gz) = 0df9f97f41650d23b14f92f7267f8c61089655efb4533d82bf8991f99245198d +SIZE (rust/crates/rustc-ap-syntax_pos-297.0.0.tar.gz) = 28074 SHA256 (rust/crates/rustc-hash-1.0.1.tar.gz) = 7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8 SIZE (rust/crates/rustc-hash-1.0.1.tar.gz) = 8976 SHA256 (rust/crates/rustc-rayon-0.1.1.tar.gz) = 8c6d5a683c6ba4ed37959097e88d71c9e8e26659a3cb5be8b389078e7ad45306 @@ -145,8 +155,6 @@ SIZE (rust/crates/syn-0.15.22.tar.gz) = 146349 SHA256 (rust/crates/tempfile-3.0.5.tar.gz) = 7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2 SIZE (rust/crates/tempfile-3.0.5.tar.gz) = 23272 -SHA256 (rust/crates/termcolor-0.3.6.tar.gz) = adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83 -SIZE (rust/crates/termcolor-0.3.6.tar.gz) = 13548 SHA256 (rust/crates/termcolor-1.0.4.tar.gz) = 4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f SIZE (rust/crates/termcolor-1.0.4.tar.gz) = 14416 SHA256 (rust/crates/termion-1.5.1.tar.gz) = 689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096 @@ -179,8 +187,6 @@ SIZE (rust/crates/winapi-util-0.1.1.tar.gz) = 7635 SHA256 (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f SIZE (rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz) = 2947998 -SHA256 (rust/crates/wincolor-0.1.6.tar.gz) = eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767 -SIZE (rust/crates/wincolor-0.1.6.tar.gz) = 4799 SHA256 (rust/crates/wincolor-1.0.1.tar.gz) = 561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba SIZE (rust/crates/wincolor-1.0.1.tar.gz) = 4737 SHA256 (racer-rust-racer-v2.1.14_GH0.tar.gz) = fae8722639f9f5310d49a365ad74380761640f7cf01d50948d9cbfaa4aa02064 Index: devel/racer/files/patch-rustc-ap-syntax-237 =================================================================== --- devel/racer/files/patch-rustc-ap-syntax-237 +++ /dev/null @@ -1,348 +0,0 @@ -error[E0106]: missing lifetime specifier - --> cargo-crates/rustc-ap-rustc_data_structures-297.0.0/vec_linked_list.rs:56:20 - | -56 | impl Links for &Ls - | ^ expected lifetime parameter - ---- Cargo.lock.orig 2018-11-27 05:23:40 UTC -+++ Cargo.lock -@@ -179,15 +179,6 @@ version = "0.2.44" - source = "registry+https://github.com/rust-lang/crates.io-index" - - [[package]] --name = "lock_api" --version = "0.1.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --dependencies = [ -- "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", --] -- --[[package]] - name = "log" - version = "0.4.6" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -225,7 +216,7 @@ dependencies = [ - - [[package]] - name = "owning_ref" --version = "0.4.0" -+version = "0.3.3" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -233,11 +224,11 @@ dependencies = [ - - [[package]] - name = "parking_lot" --version = "0.6.4" -+version = "0.5.5" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ -- "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -- "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -+ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -+ "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] -@@ -252,18 +243,6 @@ dependencies = [ - ] - - [[package]] --name = "parking_lot_core" --version = "0.3.1" --source = "registry+https://github.com/rust-lang/crates.io-index" --dependencies = [ -- "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", -- "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -- "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", --] -- --[[package]] - name = "proc-macro2" - version = "0.4.24" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -299,7 +278,7 @@ dependencies = [ - "racer-cargo-metadata 0.1.1", - "racer-testutils 0.1.0", - "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-syntax 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-syntax 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] -@@ -338,18 +317,6 @@ dependencies = [ - - [[package]] - name = "rand" --version = "0.5.5" --source = "registry+https://github.com/rust-lang/crates.io-index" --dependencies = [ -- "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -- "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -- "libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)", -- "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -- "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", --] -- --[[package]] --name = "rand" - version = "0.6.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ -@@ -377,14 +344,6 @@ dependencies = [ - - [[package]] - name = "rand_core" --version = "0.2.2" --source = "registry+https://github.com/rust-lang/crates.io-index" --dependencies = [ -- "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", --] -- --[[package]] --name = "rand_core" - version = "0.3.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - -@@ -469,40 +428,33 @@ source = "registry+https://github.com/rust-lang/crates - - [[package]] - name = "rustc-ap-arena" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ -- "rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_data_structures 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] --name = "rustc-ap-graphviz" --version = "297.0.0" --source = "registry+https://github.com/rust-lang/crates.io-index" -- --[[package]] - name = "rustc-ap-rustc_cratesio_shim" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] - name = "rustc-ap-rustc_data_structures" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ena 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", -+ "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-graphviz 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_cratesio_shim 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_cratesio_shim 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-rayon-core 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -512,34 +464,31 @@ dependencies = [ - - [[package]] - name = "rustc-ap-rustc_errors" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -- "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_cratesio_shim 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-syntax_pos 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_data_structures 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-syntax_pos 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] - name = "rustc-ap-rustc_target" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_cratesio_shim 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_cratesio_shim 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] - name = "rustc-ap-serialize" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -547,29 +496,29 @@ dependencies = [ - - [[package]] - name = "rustc-ap-syntax" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_errors 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_target 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-syntax_pos 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_data_structures 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_errors 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_target 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-syntax_pos 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - ] - - [[package]] - name = "rustc-ap-syntax_pos" --version = "297.0.0" -+version = "237.0.0" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-arena 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-arena 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-rustc_data_structures 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - ] -@@ -710,6 +659,14 @@ dependencies = [ - - [[package]] - name = "termcolor" -+version = "0.3.6" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+dependencies = [ -+ "wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -+] -+ -+[[package]] -+name = "termcolor" - version = "1.0.4" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ -@@ -814,6 +771,14 @@ source = "registry+https://github.com/rust-lang/crates - - [[package]] - name = "wincolor" -+version = "0.1.6" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+dependencies = [ -+ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -+] -+ -+[[package]] -+name = "wincolor" - version = "1.0.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ -@@ -845,24 +810,20 @@ dependencies = [ - "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" - "checksum lazycell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddba4c30a78328befecec92fc94970e53b3ae385827d28620f0f5bb2493081e0" - "checksum libc 0.2.44 (registry+https://github.com/rust-lang/crates.io-index)" = "10923947f84a519a45c8fefb7dd1b3e8c08747993381adee176d7a82b4195311" --"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" - "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" - "checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" - "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" - "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" - "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" --"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" --"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -+"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" -+"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac" - "checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" --"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" - "checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" - "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" - "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" - "checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" --"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" - "checksum rand 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9d223d52ae411a33cf7e54ec6034ec165df296ccd23533d671a28252b6f66a" - "checksum rand_chacha 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "771b009e3a508cb67e8823dda454aaa5368c7bc1c16829fb77d3e980440dd34a" --"checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" - "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" - "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" - "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -@@ -874,15 +835,14 @@ dependencies = [ - "checksum regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fbc557aac2b708fe84121caf261346cc2eed71978024337e42eb46b8a252ac6e" - "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" - "checksum rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a" --"checksum rustc-ap-arena 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b69fd4a0e8a3ecd99b497965d05f6f04dd2e4601a6146a841dbe4c8e77c2b30c" --"checksum rustc-ap-graphviz 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8136418dbc491bab74aa0565eaa2086754a7a81a5e74a1d84d6168d18e889e7" --"checksum rustc-ap-rustc_cratesio_shim 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a972feda82332d1d05b1ba5a097e915cd9c9c8f1af2bd7b08af09fb88c753d5f" --"checksum rustc-ap-rustc_data_structures 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "582584c6c48b0ece4b8aef3f9bb59d94d17c5665612bc87a71f509e45a3113b5" --"checksum rustc-ap-rustc_errors 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cd852096944d0ac6af1aefa9639a2ae6dede217606ce97f88ff0dcc8c86d6ff6" --"checksum rustc-ap-rustc_target 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "98301a272ecfeec29d2d4e97b07238707c2b89d86fc3a4a5f31a00728f14e288" --"checksum rustc-ap-serialize 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f13510e617e2e322e3297038fd6a7346f2297124af9e10e33a627c5d544e9d" --"checksum rustc-ap-syntax 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0792f5a9ccfc5ec13bb5b0472fa49e145481029c39f6bf5b1a36decc99c3328f" --"checksum rustc-ap-syntax_pos 297.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0df9f97f41650d23b14f92f7267f8c61089655efb4533d82bf8991f99245198d" -+"checksum rustc-ap-arena 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d24c8b3c1437fad023cb9472381216a1d41d82dbb2d2e6c7858bd6f50317719" -+"checksum rustc-ap-rustc_cratesio_shim 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c5b02c76cd1ee4e9c97c8228701796d6b7431e8f100dea2d8af1d6c2c2bad56" -+"checksum rustc-ap-rustc_data_structures 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4076388154497fb9a007e3badd78e415402a5594111cd6bc7ce1420dd1b1818b" -+"checksum rustc-ap-rustc_errors 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6c11e4789cbc276ceaa87d326c234b1a2d1e0fe6017b88a8a25903200060acb" -+"checksum rustc-ap-rustc_target 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "25f711bb152b9d7cdd69410cfe6d99aeb1409c959e0fdf3c8ca4d220e568aa52" -+"checksum rustc-ap-serialize 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57638db658d4942d3f30a12566836f9a67a636ed8002c8cae1c9231214e39929" -+"checksum rustc-ap-syntax 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6dbcf07abf7a9957dce8d34353d55dfb4cd882153181f24349f4690facb58f0" -+"checksum rustc-ap-syntax_pos 237.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0915cb5e166cabe588a129dec2d47357077e96fb1f9b57318fbe217eac4ce508" - "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" - "checksum rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c6d5a683c6ba4ed37959097e88d71c9e8e26659a3cb5be8b389078e7ad45306" - "checksum rustc-rayon-core 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40f06724db71e18d68b3b946fdf890ca8c921d9edccc1404fdfdb537b0d12649" -@@ -900,6 +860,7 @@ dependencies = [ - "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" - "checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7" - "checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2" -+"checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83" - "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" - "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" - "checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" -@@ -916,4 +877,5 @@ dependencies = [ - "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - "checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" - "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -+"checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767" - "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" ---- Cargo.toml.orig 2018-11-27 05:23:40 UTC -+++ Cargo.toml -@@ -24,7 +24,7 @@ debug = false # because of #1005 - [dependencies] - bitflags = "1.0" - log = "0.4" --rustc-ap-syntax = "297.0.0" -+rustc-ap-syntax = "237.0.0" - env_logger = "0.6" - clap = "2.32" - lazy_static = "1.2" Index: lang/rust/Makefile =================================================================== --- lang/rust/Makefile +++ lang/rust/Makefile @@ -2,10 +2,10 @@ # $FreeBSD$ PORTNAME= rust -PORTVERSION?= 1.30.1 +PORTVERSION?= 1.31.0 PORTREVISION?= 0 CATEGORIES= lang -MASTER_SITES= http://static.rust-lang.org/dist/:src \ +MASTER_SITES= http://dev-static.rust-lang.org/dist/:src \ LOCAL/dumbbell/rust:rust_bootstrap \ https://static.rust-lang.org/dist/:rust_bootstrap \ LOCAL/dumbbell/rust:cargo_bootstrap \ @@ -47,13 +47,13 @@ CONFLICTS_INSTALL?= rust-nightly # See WRKSRC/src/stage0.txt for this date and version values. -BOOTSTRAPS_DATE?= 2018-10-12 +BOOTSTRAPS_DATE?= 2018-10-25 -RUST_BOOTSTRAP_VERSION?= 1.29.2 +RUST_BOOTSTRAP_VERSION?= 1.30.0 RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz -CARGO_BOOTSTRAP_VERSION?= 0.30.0 +CARGO_BOOTSTRAP_VERSION?= 0.31.0 CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//} Index: lang/rust/distinfo =================================================================== --- lang/rust/distinfo +++ lang/rust/distinfo @@ -1,15 +1,15 @@ -TIMESTAMP = 1541756539 -SHA256 (rust/rustc-1.30.1-src.tar.xz) = 76c824e26b6a554cd48f45993e42001816c2f515dd1b252e3c8315fe200155ae -SIZE (rust/rustc-1.30.1-src.tar.xz) = 96086232 -SHA256 (rust/2018-10-12/rustc-1.29.2-x86_64-unknown-freebsd.tar.gz) = 94fba7a7b88ca86c037a48376b7e09bb4ca66e1268fc8d664796cdbdee97c0fa -SIZE (rust/2018-10-12/rustc-1.29.2-x86_64-unknown-freebsd.tar.gz) = 66548519 -SHA256 (rust/2018-10-12/rust-std-1.29.2-x86_64-unknown-freebsd.tar.gz) = ddde8a33ddd902471c51f273087d90e9f7f184b7f09f5d14cab454c8c4965ec2 -SIZE (rust/2018-10-12/rust-std-1.29.2-x86_64-unknown-freebsd.tar.gz) = 64503048 -SHA256 (rust/2018-10-12/cargo-0.30.0-x86_64-unknown-freebsd.tar.gz) = cdee0b90aedc51a239bbd44ed788111393da227d2950005f3730df938aa8303e -SIZE (rust/2018-10-12/cargo-0.30.0-x86_64-unknown-freebsd.tar.gz) = 7411378 -SHA256 (rust/2018-10-12/rustc-1.29.2-i686-unknown-freebsd.tar.gz) = 8115f4c9958623589746dbe7cc61bcd1998077af086ca2242d1d7a771a6202ab -SIZE (rust/2018-10-12/rustc-1.29.2-i686-unknown-freebsd.tar.gz) = 67556724 -SHA256 (rust/2018-10-12/rust-std-1.29.2-i686-unknown-freebsd.tar.gz) = 31806e3fb30d48e18661af14aea920caa3a322388711a5a6f6998d22878d29c0 -SIZE (rust/2018-10-12/rust-std-1.29.2-i686-unknown-freebsd.tar.gz) = 64847326 -SHA256 (rust/2018-10-12/cargo-0.30.0-i686-unknown-freebsd.tar.gz) = e62e26635f1ee70bcbe5d6bef69dea938668ba6933fa96f32df84d2f47d131c3 -SIZE (rust/2018-10-12/cargo-0.30.0-i686-unknown-freebsd.tar.gz) = 7198097 +TIMESTAMP = 1543867561 +SHA256 (rust/rustc-1.31.0-src.tar.xz) = 197a4159da895f680e9ecbc3eca3393906790ef3a2ef7b35a193b73ea2ac1712 +SIZE (rust/rustc-1.31.0-src.tar.xz) = 96908864 +SHA256 (rust/2018-10-25/rustc-1.30.0-x86_64-unknown-freebsd.tar.gz) = 68a74949e34118406673cf8cc0098b011907c840890e0640aa3b145ce91c521d +SIZE (rust/2018-10-25/rustc-1.30.0-x86_64-unknown-freebsd.tar.gz) = 68231553 +SHA256 (rust/2018-10-25/rust-std-1.30.0-x86_64-unknown-freebsd.tar.gz) = 4040fe677524e2ead69a2fcab4c16acaad3d4c4f1210ae36f400f82463bdfbc7 +SIZE (rust/2018-10-25/rust-std-1.30.0-x86_64-unknown-freebsd.tar.gz) = 67081473 +SHA256 (rust/2018-10-25/cargo-0.31.0-x86_64-unknown-freebsd.tar.gz) = 2b9176bb34e6cdf663d3f5ad0c89f862696eecc79b7de7db482ce4dd995eb3e8 +SIZE (rust/2018-10-25/cargo-0.31.0-x86_64-unknown-freebsd.tar.gz) = 6439361 +SHA256 (rust/2018-10-25/rustc-1.30.0-i686-unknown-freebsd.tar.gz) = 26f5fa76d6033559a21e84876b8fe11e1b3621c226b243505a5fc45a3afaae90 +SIZE (rust/2018-10-25/rustc-1.30.0-i686-unknown-freebsd.tar.gz) = 69069431 +SHA256 (rust/2018-10-25/rust-std-1.30.0-i686-unknown-freebsd.tar.gz) = 267716811f1e2813a76f30f11293fb2c69f398f69a886b94587d821e743d4e20 +SIZE (rust/2018-10-25/rust-std-1.30.0-i686-unknown-freebsd.tar.gz) = 67319097 +SHA256 (rust/2018-10-25/cargo-0.31.0-i686-unknown-freebsd.tar.gz) = c291ed53edd74fabbab85328bebbc6ca12db6eaf3d76e7c4624d642fa05c7dbe +SIZE (rust/2018-10-25/cargo-0.31.0-i686-unknown-freebsd.tar.gz) = 6146453 Index: lang/rust/files/patch-src_vendor_openssl-sys_.cargo-checksum.json =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_.cargo-checksum.json +++ lang/rust/files/patch-src_vendor_openssl-sys_.cargo-checksum.json @@ -1,6 +1,7 @@ ---- src/vendor/openssl-sys/.cargo-checksum.json.orig 2018-09-11 04:49:55 UTC +--- src/vendor/openssl-sys/.cargo-checksum.json.orig 2018-12-03 20:08:24 UTC +++ src/vendor/openssl-sys/.cargo-checksum.json @@ -1 +1 @@ --{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"15b9e9f5255d11898d5f373ba8ac750d567155b1c81fa903f02e97b18cea5f18","Cargo.toml.orig":"3ec9308dd6326a80e0e30c076dd778f42cb1f1f616e666e924a210554681dd97","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"15b264aba47e69aa522c8cb37b320a156f0c3a3a72393338818046eac8ef4c3a","build/cfgs.rs":"b853b4100ed5421e4f4d436c3bb067f33c2a0349ff64ee121390bf23e1b769d5","build/main.rs":"bbb6b8a9b43fa47dc985c84ab6a5e64d7b77ae60c54b3038b68a4cef1a6759ab","src/lib.rs":"008a98eb5da8cb154b8f59904a9524a0a9cb22818ec734696c52d7ece384ab97","src/libressl/mod.rs":"412020ed9f0cbbb500f3f4d7157d8b2fc4a86eab6f6ba3293ca6ffd7bd0ac4f6","src/libressl/v250.rs":"8e64255d67e9e684b6d76184f96cfb8dca34c7f241fdbc08a982a221644257ea","src/libressl/v251.rs":"e823b2b5b103a9a2b3c307893f6fc8ca4213104fe3829b32fa3ce879bbc1ada9","src/libressl/v273.rs":"01492f8c44438a82466eac1b827dbed3213f21f0b5f6425259a0131e9e036aeb","src/openssl/mod.rs":"b63d420700cb96626e7795a10000e178477af90db6d6830c70a66f6d2b4e64d2","src/openssl/v10x.rs":"6b53ce40257a5ff8326ec5f0d6a83807c728c243ad5bde34b9782cdf8f157a21","src/openssl/v110.rs":"0e670f6af0bfbdb635012a3667b599a2b7c468e55ef29b289ab288e01c795e02","src/openssl/v111.rs":"26e5ef4c4faa628d8cec33cf77fc3736f9d01334227429114e91920439b65876"},"package":"912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129"} +-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","Cargo.toml.orig":"82cf41fb8d0886217e4efe5b7bd69ac9d687ddd38d002b5aeeb5fc073abc0e17","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"f509c63668156ce48b93d05d5483a5bfb112dc8f786ff6296f7801add2db7452","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58fa19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"} +\ No newline at end of file ++{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"e40f8c3ccf6a2b34f50ae9cee3396ac398944ee253c1e5dabac802ee89732ba2","Cargo.toml.orig":"82cf41fb8d0886217e4efe5b7bd69ac9d687ddd38d002b5aeeb5fc073abc0e17","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"fae5176c2b149d190c9611b58c5882312b5c0e483d1a404cfdf850473314a58f","build/main.rs":"7d9c734c4bfce15d5ca86ea82e7f68e6af2b9e9d64c7414dbfefc3a84bc01487","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"4f12d2f4c2a493888db669d1ecfd55df40861a78cae65957f801ed91dc2cae30","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"29aa053b67b47515fd15812aa0a90ff35dd9fa347da2beeba96d6deafeb9d945","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"520b282b92fa372a75bc16696dc3ee7a9a5752e517a18862182a3e9f5a976d28","src/dsa.rs":"3c294c5c45235497396ac803b723b3a0cb5bd3609f5dec18338b5b014c2adeb9","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"b22d27b01a70652384866b3d0d01d2f7a0421b2ba2db9268ed379fef4b1ac034","src/err.rs":"81230711e081277e0b6dae4ff21266052d075688c758c2b0720001849ef9192d","src/evp.rs":"57f094c7fee0a6b0611e7f8829663bff525a607e11a35eb77dc30eb159b2139a","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"17b5a1faa0fe3ab777c8cb0039a3dffd8922b211bf1330c2cd0c3e02f624353c","src/macros.rs":"a7c95174fd4cfeb42f730c7c0744194009520249888dbf43968571219fd6dfa1","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"619177f939328597e4bcf9c41fdf4d0aa9207d779c6e0dafddbe2eab9b1a6a98","src/pem.rs":"3ae1c53dbc126a04c188575294111cc04c215c2f3e031192d5cc05952f011ddf","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"156e605ecb45d4e1b7a7c404003ccd19c4a2226cbfe47938ad1dce240ed4369f","src/rsa.rs":"a0bf64f1f8ff9f6e5dbed6c38d8fa2d3d1c5dfcfe6dd3ff79f7737b072ce4681","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"e69d3b9b8f2f8ae1ed3905a4dbe064ad1b7c1eaf21d7eabb86ecdb5b41e2120a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"fd85a1683064def0a9e07d803b90102229adc1d58fa19cf4e56976f0dd7425b9","src/x509.rs":"839be2feb74755ab7df66a024ad27dfa70ce4f7889229d9152ba999f3a54b914","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"66fd646ea4caf5ce81e3c881e88d85462519c4e97a7f82e82ca8ac52ea830ad2"},"package":"ff3d1b390ab1b9700f682ad95a30dc9c0f40dd212ca57266012cfc678b0e365a"} \ No newline at end of file -+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"15b9e9f5255d11898d5f373ba8ac750d567155b1c81fa903f02e97b18cea5f18","Cargo.toml.orig":"3ec9308dd6326a80e0e30c076dd778f42cb1f1f616e666e924a210554681dd97","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"15b264aba47e69aa522c8cb37b320a156f0c3a3a72393338818046eac8ef4c3a","build/cfgs.rs":"499f32ddaa16e3771dca2b70f1d4f66f91491456ffb3e1954901abd57bc64e10","build/main.rs":"2383c602ce6ab23e9980e0d1dcf808ae5fb953c3b6ec7d7ea406293ddde679fd","src/lib.rs":"d3cd894a42d59f3e3d19ef1a376f2287971b68227c3ce142b307c5c05e1b2840"},"package":"912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129"} Index: lang/rust/files/patch-src_vendor_openssl-sys_build_cfgs.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_build_cfgs.rs +++ /dev/null @@ -1,22 +0,0 @@ ---- src/vendor/openssl-sys/build/cfgs.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/build/cfgs.rs -@@ -16,6 +16,9 @@ pub fn get(openssl_version: Option, libressl_vers - if libressl_version >= 0x2_07_03_00_0 { - cfgs.push("libressl273"); - } -+ if libressl_version >= 0x2_08_00_00_0 { -+ cfgs.push("libressl280"); -+ } - } else { - let openssl_version = openssl_version.unwrap(); - -@@ -24,6 +27,9 @@ pub fn get(openssl_version: Option, libressl_vers - } - if openssl_version >= 0x1_00_02_00_0 { - cfgs.push("ossl102"); -+ } -+ if openssl_version >= 0x1_00_02_06_0 { -+ cfgs.push("ossl102f"); - } - if openssl_version >= 0x1_00_02_08_0 { - cfgs.push("ossl102h"); Index: lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs +++ lang/rust/files/patch-src_vendor_openssl-sys_build_main.rs @@ -1,19 +1,55 @@ ---- src/vendor/openssl-sys/build/main.rs.orig 2018-09-11 04:49:55 UTC +https://github.com/sfackler/rust-openssl/commit/9fd7584a8416 + +--- src/vendor/openssl-sys/build/main.rs.orig 2018-12-03 20:08:24 UTC +++ src/vendor/openssl-sys/build/main.rs -@@ -497,6 +497,7 @@ See rust-openssl README for more information: - (6, 2) => ('6', '2'), - (6, _) => ('6', 'x'), +@@ -1,9 +1,9 @@ + extern crate cc; ++#[cfg(feature = "vendored")] ++extern crate openssl_src; + extern crate pkg_config; + #[cfg(target_env = "msvc")] + extern crate vcpkg; +-#[cfg(feature = "vendored")] +-extern crate openssl_src; + + use std::collections::HashSet; + use std::env; +@@ -103,20 +103,23 @@ fn main() { + + #[cfg(feature = "vendored")] + mod imp { +- use std::path::PathBuf; +- use openssl_src; ++ use openssl_src; ++ use std::path::PathBuf; + +- pub fn get_openssl(_target: &str) -> (PathBuf, PathBuf) { +- let artifacts = openssl_src::Build::new().build(); +- (artifacts.lib_dir().to_path_buf(), artifacts.include_dir().to_path_buf()) +- } ++ pub fn get_openssl(_target: &str) -> (PathBuf, PathBuf) { ++ let artifacts = openssl_src::Build::new().build(); ++ ( ++ artifacts.lib_dir().to_path_buf(), ++ artifacts.include_dir().to_path_buf(), ++ ) ++ } + } + + #[cfg(not(feature = "vendored"))] + mod imp { + use pkg_config; +- use std::path::{Path, PathBuf}; + use std::ffi::OsString; ++ use std::path::{Path, PathBuf}; + use std::process::{self, Command}; + + use super::env; +@@ -500,6 +503,7 @@ See rust-openssl README for more information: (7, _) => ('7', 'x'), + (8, 0) => ('8', '0'), + (8, 1) => ('8', '1'), + (8, _) => ('8', 'x'), _ => version_error(), }; -@@ -537,7 +538,7 @@ fn version_error() -> ! { - " - - This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 --through 2.7, but a different version of OpenSSL was found. The build is now aborting -+through 2.8, but a different version of OpenSSL was found. The build is now aborting - due to this version mismatch. - - " Index: lang/rust/files/patch-src_vendor_openssl-sys_src_aes.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_aes.rs +++ /dev/null @@ -1,31 +0,0 @@ ---- src/vendor/openssl-sys/src/aes.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/aes.rs -@@ -0,0 +1,28 @@ -+use libc::*; -+ -+pub const AES_ENCRYPT: c_int = 1; -+pub const AES_DECRYPT: c_int = 0; -+ -+pub const AES_MAXNR: c_int = 14; -+pub const AES_BLOCK_SIZE: c_int = 16; -+ -+#[repr(C)] -+pub struct AES_KEY { -+ // There is some business with AES_LONG which is there to ensure the values here are 32 bits -+ rd_key: [u32; 4 * (AES_MAXNR as usize + 1)], -+ rounds: c_int, -+} -+ -+extern "C" { -+ pub fn AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; -+ pub fn AES_set_decrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; -+ -+ pub fn AES_ige_encrypt( -+ in_: *const c_uchar, -+ out: *mut c_uchar, -+ length: size_t, -+ key: *const AES_KEY, -+ ivec: *mut c_uchar, -+ enc: c_int, -+ ); -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_asn1.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_asn1.rs +++ /dev/null @@ -1,64 +0,0 @@ ---- src/vendor/openssl-sys/src/asn1.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/asn1.rs -@@ -0,0 +1,61 @@ -+use libc::*; -+ -+use *; -+ -+pub const V_ASN1_UTCTIME: c_int = 23; -+pub const V_ASN1_GENERALIZEDTIME: c_int = 24; -+ -+pub const MBSTRING_FLAG: c_int = 0x1000; -+pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG; -+pub const MBSTRING_ASC: c_int = MBSTRING_FLAG | 1; -+pub const MBSTRING_BMP: c_int = MBSTRING_FLAG | 2; -+pub const MBSTRING_UNIV: c_int = MBSTRING_FLAG | 4; -+ -+#[repr(C)] -+pub struct ASN1_ENCODING { -+ pub enc: *mut c_uchar, -+ pub len: c_long, -+ pub modified: c_int, -+} -+ -+extern "C" { -+ pub fn ASN1_OBJECT_free(x: *mut ASN1_OBJECT); -+} -+ -+stack!(stack_st_ASN1_OBJECT); -+ -+extern "C" { -+ pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn ASN1_STRING_get0_data(x: *const ASN1_STRING) -> *const c_uchar; -+ #[cfg(any(all(ossl101, not(ossl110)), libressl))] -+ pub fn ASN1_STRING_data(x: *mut ASN1_STRING) -> *mut c_uchar; -+ -+ pub fn ASN1_BIT_STRING_free(x: *mut ASN1_BIT_STRING); -+ -+ pub fn ASN1_STRING_free(x: *mut ASN1_STRING); -+ pub fn ASN1_STRING_length(x: *const ASN1_STRING) -> c_int; -+ -+ pub fn ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME); -+ pub fn ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int; -+ pub fn ASN1_TIME_free(tm: *mut ASN1_TIME); -+ pub fn ASN1_TIME_print(b: *mut BIO, tm: *const ASN1_TIME) -> c_int; -+ -+ pub fn ASN1_INTEGER_free(x: *mut ASN1_INTEGER); -+ pub fn ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long; -+ pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; -+ pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; -+ pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *const ASN1_STRING) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ASN1_STRING) -> c_int; -+ } -+ } -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_bio.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_bio.rs +++ /dev/null @@ -1,153 +0,0 @@ ---- src/vendor/openssl-sys/src/bio.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/bio.rs -@@ -0,0 +1,150 @@ -+use libc::*; -+ -+use *; -+ -+pub const BIO_TYPE_NONE: c_int = 0; -+ -+pub const BIO_CTRL_EOF: c_int = 2; -+pub const BIO_CTRL_INFO: c_int = 3; -+pub const BIO_CTRL_FLUSH: c_int = 11; -+pub const BIO_C_SET_BUF_MEM_EOF_RETURN: c_int = 130; -+ -+extern "C" { -+ pub fn BIO_set_flags(b: *mut BIO, flags: c_int); -+ pub fn BIO_clear_flags(b: *mut BIO, flags: c_int); -+} -+ -+pub unsafe fn BIO_set_retry_read(b: *mut BIO) { -+ BIO_set_flags(b, BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY) -+} -+ -+pub unsafe fn BIO_set_retry_write(b: *mut BIO) { -+ BIO_set_flags(b, BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY) -+} -+ -+pub unsafe fn BIO_clear_retry_flags(b: *mut BIO) { -+ BIO_clear_flags(b, BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY) -+} -+ -+pub const BIO_FLAGS_READ: c_int = 0x01; -+pub const BIO_FLAGS_WRITE: c_int = 0x02; -+pub const BIO_FLAGS_IO_SPECIAL: c_int = 0x04; -+pub const BIO_FLAGS_RWS: c_int = BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL; -+pub const BIO_FLAGS_SHOULD_RETRY: c_int = 0x08; -+ -+pub type bio_info_cb = -+ Option; -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum BIO_METHOD {} -+ } else { -+ #[repr(C)] -+ pub struct BIO_METHOD { -+ pub type_: c_int, -+ pub name: *const c_char, -+ pub bwrite: Option c_int>, -+ pub bread: Option c_int>, -+ pub bputs: Option c_int>, -+ pub bgets: Option c_int>, -+ pub ctrl: Option c_long>, -+ pub create: Option c_int>, -+ pub destroy: Option c_int>, -+ pub callback_ctrl: Option c_long>, -+ } -+ } -+} -+ -+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) -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn BIO_s_file() -> *const BIO_METHOD; -+ pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; -+ } -+ } else { -+ extern "C" { -+ pub fn BIO_s_file() -> *mut BIO_METHOD; -+ pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO; -+ } -+ } -+} -+extern "C" { -+ pub fn BIO_new_fp(stream: *mut FILE, close_flag: c_int) -> *mut BIO; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_set_data(a: *mut ::BIO, data: *mut c_void); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_get_data(a: *mut ::BIO) -> *mut c_void; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_set_init(a: *mut ::BIO, init: c_int); -+ pub fn BIO_write(b: *mut BIO, buf: *const c_void, len: c_int) -> c_int; -+ pub fn BIO_read(b: *mut BIO, buf: *mut c_void, len: c_int) -> c_int; -+ pub fn BIO_ctrl(b: *mut BIO, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -+ pub fn BIO_free_all(b: *mut BIO); -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn BIO_s_mem() -> *const BIO_METHOD; -+ } -+ } else { -+ extern "C" { -+ pub fn BIO_s_mem() -> *mut BIO_METHOD; -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(any(ossl102, libressl280))] { -+ extern "C" { -+ pub fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO; -+ } -+ } else { -+ extern "C" { -+ pub fn BIO_new_mem_buf(buf: *mut c_void, len: c_int) -> *mut BIO; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO; -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_new(type_: c_int, name: *const c_char) -> *mut BIO_METHOD; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_free(biom: *mut BIO_METHOD); -+ // FIXME should wrap in Option -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_write( -+ biom: *mut BIO_METHOD, -+ write: unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_read( -+ biom: *mut BIO_METHOD, -+ read: unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_puts( -+ biom: *mut BIO_METHOD, -+ read: unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_ctrl( -+ biom: *mut BIO_METHOD, -+ read: unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_create( -+ biom: *mut BIO_METHOD, -+ create: unsafe extern "C" fn(*mut BIO) -> c_int, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn BIO_meth_set_destroy( -+ biom: *mut BIO_METHOD, -+ destroy: unsafe extern "C" fn(*mut BIO) -> c_int, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_bn.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_bn.rs +++ /dev/null @@ -1,163 +0,0 @@ ---- src/vendor/openssl-sys/src/bn.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/bn.rs -@@ -0,0 +1,160 @@ -+use libc::*; -+ -+use *; -+ -+#[cfg(target_pointer_width = "64")] -+pub type BN_ULONG = c_ulonglong; -+#[cfg(target_pointer_width = "32")] -+pub type BN_ULONG = c_uint; -+ -+extern "C" { -+ pub fn BN_CTX_new() -> *mut BN_CTX; -+ pub fn BN_CTX_free(ctx: *mut BN_CTX); -+ pub fn BN_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; -+ pub fn BN_pseudo_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; -+ pub fn BN_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int; -+ pub fn BN_pseudo_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int; -+ pub fn BN_new() -> *mut BIGNUM; -+ pub fn BN_num_bits(bn: *const BIGNUM) -> c_int; -+ pub fn BN_clear_free(bn: *mut BIGNUM); -+ pub fn BN_bin2bn(s: *const u8, size: c_int, ret: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_bn2bin(a: *const BIGNUM, to: *mut u8) -> c_int; -+ pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int; -+ pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int; -+ pub fn BN_mul(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -+ pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -+ pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int); -+ #[cfg(ossl110)] -+ pub fn BN_is_negative(b: *const ::BIGNUM) -> c_int; -+ -+ pub fn BN_div( -+ dv: *mut BIGNUM, -+ rem: *mut BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ pub fn BN_nnmod( -+ rem: *mut BIGNUM, -+ a: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ pub fn BN_mod_add( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ pub fn BN_mod_sub( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ pub fn BN_mod_mul( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ pub fn BN_mod_sqr( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn BN_mod_word(r: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; -+ pub fn BN_div_word(r: *mut BIGNUM, w: BN_ULONG) -> BN_ULONG; -+ pub fn BN_mul_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -+ pub fn BN_add_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -+ pub fn BN_sub_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -+ pub fn BN_set_word(bn: *mut BIGNUM, n: BN_ULONG) -> c_int; -+ -+ pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int; -+ pub fn BN_free(bn: *mut BIGNUM); -+ pub fn BN_is_bit_set(a: *const BIGNUM, n: c_int) -> c_int; -+ pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int; -+ pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int; -+ pub fn BN_exp(r: *mut BIGNUM, a: *const BIGNUM, p: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -+ -+ pub fn BN_mod_exp( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ p: *const BIGNUM, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn BN_mask_bits(a: *mut BIGNUM, n: c_int) -> c_int; -+ pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int; -+ pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int; -+ pub fn BN_bn2hex(a: *const BIGNUM) -> *mut c_char; -+ pub fn BN_bn2dec(a: *const BIGNUM) -> *mut c_char; -+ pub fn BN_hex2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int; -+ pub fn BN_dec2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int; -+ pub fn BN_gcd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -+ pub fn BN_mod_inverse( -+ r: *mut BIGNUM, -+ a: *const BIGNUM, -+ n: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> *mut BIGNUM; -+ pub fn BN_clear(bn: *mut BIGNUM); -+ pub fn BN_dup(n: *const BIGNUM) -> *mut BIGNUM; -+ pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int; -+ pub fn BN_set_bit(a: *mut BIGNUM, n: c_int) -> c_int; -+ pub fn BN_clear_bit(a: *mut BIGNUM, n: c_int) -> c_int; -+ -+ pub fn BN_generate_prime_ex( -+ r: *mut BIGNUM, -+ bits: c_int, -+ safe: c_int, -+ add: *const BIGNUM, -+ rem: *const BIGNUM, -+ cb: *mut BN_GENCB, -+ ) -> c_int; -+ pub fn BN_is_prime_ex( -+ p: *const BIGNUM, -+ checks: c_int, -+ ctx: *mut BN_CTX, -+ cb: *mut BN_GENCB, -+ ) -> c_int; -+ pub fn BN_is_prime_fasttest_ex( -+ p: *const BIGNUM, -+ checks: c_int, -+ ctx: *mut BN_CTX, -+ do_trial_division: c_int, -+ cb: *mut BN_GENCB, -+ ) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn BN_get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn BN_get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM; -+ } -+ } else { -+ extern "C" { -+ pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM; -+ pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM; -+ } -+ } -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_cms.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_cms.rs +++ /dev/null @@ -1,82 +0,0 @@ ---- src/vendor/openssl-sys/src/cms.rs.orig 2018-09-16 23:52:55 UTC -+++ src/vendor/openssl-sys/src/cms.rs -@@ -0,0 +1,79 @@ -+use libc::*; -+ -+pub enum CMS_ContentInfo {} -+ -+extern "C" { -+ #[cfg(ossl101)] -+ pub fn CMS_ContentInfo_free(cms: *mut ::CMS_ContentInfo); -+ #[cfg(ossl101)] -+ pub fn i2d_CMS_ContentInfo(a: *mut ::CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int; -+} -+ -+#[cfg(ossl101)] -+pub const CMS_TEXT: c_uint = 0x1; -+#[cfg(ossl101)] -+pub const CMS_NOCERTS: c_uint = 0x2; -+#[cfg(ossl101)] -+pub const CMS_NO_CONTENT_VERIFY: c_uint = 0x4; -+#[cfg(ossl101)] -+pub const CMS_NO_ATTR_VERIFY: c_uint = 0x8; -+#[cfg(ossl101)] -+pub const CMS_NOSIGS: c_uint = 0x4 | 0x8; -+#[cfg(ossl101)] -+pub const CMS_NOINTERN: c_uint = 0x10; -+#[cfg(ossl101)] -+pub const CMS_NO_SIGNER_CERT_VERIFY: c_uint = 0x20; -+#[cfg(ossl101)] -+pub const CMS_NOVERIFY: c_uint = 0x20; -+#[cfg(ossl101)] -+pub const CMS_DETACHED: c_uint = 0x40; -+#[cfg(ossl101)] -+pub const CMS_BINARY: c_uint = 0x80; -+#[cfg(ossl101)] -+pub const CMS_NOATTR: c_uint = 0x100; -+#[cfg(ossl101)] -+pub const CMS_NOSMIMECAP: c_uint = 0x200; -+#[cfg(ossl101)] -+pub const CMS_NOOLDMIMETYPE: c_uint = 0x400; -+#[cfg(ossl101)] -+pub const CMS_CRLFEOL: c_uint = 0x800; -+#[cfg(ossl101)] -+pub const CMS_STREAM: c_uint = 0x1000; -+#[cfg(ossl101)] -+pub const CMS_NOCRL: c_uint = 0x2000; -+#[cfg(ossl101)] -+pub const CMS_PARTIAL: c_uint = 0x4000; -+#[cfg(ossl101)] -+pub const CMS_REUSE_DIGEST: c_uint = 0x8000; -+#[cfg(ossl101)] -+pub const CMS_USE_KEYID: c_uint = 0x10000; -+#[cfg(ossl101)] -+pub const CMS_DEBUG_DECRYPT: c_uint = 0x20000; -+#[cfg(ossl102)] -+pub const CMS_KEY_PARAM: c_uint = 0x40000; -+#[cfg(ossl110)] -+pub const CMS_ASCIICRLF: c_uint = 0x80000; -+ -+extern "C" { -+ #[cfg(ossl101)] -+ pub fn SMIME_read_CMS(bio: *mut ::BIO, bcont: *mut *mut ::BIO) -> *mut ::CMS_ContentInfo; -+ -+ #[cfg(ossl101)] -+ 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(ossl101)] -+ pub fn CMS_decrypt( -+ cms: *mut ::CMS_ContentInfo, -+ pkey: *mut ::EVP_PKEY, -+ cert: *mut ::X509, -+ dcont: *mut ::BIO, -+ out: *mut ::BIO, -+ flags: c_uint, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_conf.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_conf.rs +++ /dev/null @@ -1,10 +0,0 @@ ---- src/vendor/openssl-sys/src/conf.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/conf.rs -@@ -0,0 +1,7 @@ -+use *; -+ -+extern "C" { -+ pub fn NCONF_new(meth: *mut CONF_METHOD) -> *mut CONF; -+ pub fn NCONF_default() -> *mut CONF_METHOD; -+ pub fn NCONF_free(conf: *mut CONF); -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_crypto.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_crypto.rs +++ /dev/null @@ -1,125 +0,0 @@ ---- src/vendor/openssl-sys/src/crypto.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/crypto.rs -@@ -0,0 +1,122 @@ -+use libc::*; -+ -+use *; -+ -+#[cfg(not(ossl110))] -+pub const CRYPTO_LOCK_X509: c_int = 3; -+#[cfg(not(ossl110))] -+pub const CRYPTO_LOCK_SSL_CTX: c_int = 12; -+#[cfg(not(ossl110))] -+pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14; -+ -+stack!(stack_st_void); -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub const CRYPTO_EX_INDEX_SSL: c_int = 0; -+ pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1; -+ -+ extern "C" { -+ pub fn OpenSSL_version_num() -> c_ulong; -+ pub fn OpenSSL_version(key: c_int) -> *const c_char; -+ } -+ pub const OPENSSL_VERSION: c_int = 0; -+ pub const OPENSSL_CFLAGS: c_int = 1; -+ pub const OPENSSL_BUILT_ON: c_int = 2; -+ pub const OPENSSL_PLATFORM: c_int = 3; -+ pub const OPENSSL_DIR: c_int = 4; -+ } else { -+ extern "C" { -+ pub fn SSLeay() -> c_ulong; -+ pub fn SSLeay_version(key: c_int) -> *const c_char; -+ } -+ pub const SSLEAY_VERSION: c_int = 0; -+ pub const SSLEAY_CFLAGS: c_int = 2; -+ pub const SSLEAY_BUILT_ON: c_int = 3; -+ pub const SSLEAY_PLATFORM: c_int = 4; -+ pub const SSLEAY_DIR: c_int = 5; -+ } -+} -+ -+// FIXME should be options -+pub type CRYPTO_EX_new = unsafe extern "C" fn( -+ parent: *mut c_void, -+ ptr: *mut c_void, -+ ad: *const CRYPTO_EX_DATA, -+ idx: c_int, -+ argl: c_long, -+ argp: *const c_void, -+) -> c_int; -+pub type CRYPTO_EX_dup = unsafe extern "C" fn( -+ to: *mut CRYPTO_EX_DATA, -+ from: *mut CRYPTO_EX_DATA, -+ from_d: *mut c_void, -+ idx: c_int, -+ argl: c_long, -+ argp: *mut c_void, -+) -> c_int; -+pub type CRYPTO_EX_free = unsafe extern "C" fn( -+ parent: *mut c_void, -+ ptr: *mut c_void, -+ ad: *mut CRYPTO_EX_DATA, -+ idx: c_int, -+ argl: c_long, -+ argp: *mut c_void, -+); -+extern "C" { -+ #[cfg(ossl110)] -+ pub fn CRYPTO_get_ex_new_index( -+ class_index: c_int, -+ argl: c_long, -+ argp: *mut c_void, -+ new_func: Option, -+ dup_func: Option, -+ free_func: Option, -+ ) -> c_int; -+} -+ -+pub const CRYPTO_LOCK: c_int = 1; -+ -+extern "C" { -+ #[cfg(not(ossl110))] -+ pub fn CRYPTO_num_locks() -> c_int; -+ #[cfg(not(ossl110))] -+ pub fn CRYPTO_set_locking_callback( -+ func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int), -+ ); -+ -+ #[cfg(not(ossl110))] -+ pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong); -+ -+ #[cfg(not(ossl110))] -+ pub fn CRYPTO_add_lock( -+ pointer: *mut c_int, -+ amount: c_int, -+ type_: c_int, -+ file: *const c_char, -+ line: c_int, -+ ) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn CRYPTO_malloc(num: size_t, file: *const c_char, line: c_int) -> *mut c_void; -+ pub fn CRYPTO_free(buf: *mut c_void, file: *const c_char, line: c_int); -+ } -+ } else { -+ extern "C" { -+ pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void; -+ pub fn CRYPTO_free(buf: *mut c_void); -+ } -+ } -+} -+ -+extern "C" { -+ #[cfg(ossl101)] -+ pub fn FIPS_mode() -> c_int; -+ #[cfg(ossl101)] -+ pub fn FIPS_mode_set(onoff: c_int) -> c_int; -+ -+ pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_dh.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_dh.rs +++ /dev/null @@ -1,27 +0,0 @@ ---- src/vendor/openssl-sys/src/dh.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/dh.rs -@@ -0,0 +1,24 @@ -+use *; -+ -+extern "C" { -+ pub fn DH_new() -> *mut DH; -+ pub fn DH_free(dh: *mut DH); -+ -+ pub fn d2i_DHparams(k: *mut *mut DH, pp: *mut *const c_uchar, length: c_long) -> *mut DH; -+ pub fn i2d_DHparams(dh: *const DH, pp: *mut *mut c_uchar) -> c_int; -+ -+ #[cfg(ossl102)] -+ pub fn DH_get_1024_160() -> *mut DH; -+ #[cfg(ossl102)] -+ pub fn DH_get_2048_224() -> *mut DH; -+ #[cfg(ossl102)] -+ pub fn DH_get_2048_256() -> *mut DH; -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn DH_set0_pqg( -+ dh: *mut DH, -+ p: *mut BIGNUM, -+ q: *mut BIGNUM, -+ g: *mut BIGNUM, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_dsa.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_dsa.rs +++ /dev/null @@ -1,69 +0,0 @@ ---- src/vendor/openssl-sys/src/dsa.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/dsa.rs -@@ -0,0 +1,66 @@ -+use libc::*; -+ -+use *; -+ -+extern "C" { -+ pub fn DSA_new() -> *mut DSA; -+ pub fn DSA_free(dsa: *mut DSA); -+ pub fn DSA_size(dsa: *const DSA) -> c_int; -+ pub fn DSA_sign( -+ dummy: c_int, -+ dgst: *const c_uchar, -+ len: c_int, -+ sigret: *mut c_uchar, -+ siglen: *mut c_uint, -+ dsa: *mut DSA, -+ ) -> c_int; -+ pub fn DSA_verify( -+ dummy: c_int, -+ dgst: *const c_uchar, -+ len: c_int, -+ sigbuf: *const c_uchar, -+ siglen: c_int, -+ dsa: *mut DSA, -+ ) -> c_int; -+ -+ pub fn d2i_DSAPublicKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -> *mut DSA; -+ pub fn d2i_DSAPrivateKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -+ -> *mut DSA; -+ -+ pub fn DSA_generate_parameters_ex( -+ dsa: *mut DSA, -+ bits: c_int, -+ seed: *const c_uchar, -+ seed_len: c_int, -+ counter_ref: *mut c_int, -+ h_ret: *mut c_ulong, -+ cb: *mut BN_GENCB, -+ ) -> c_int; -+ -+ pub fn DSA_generate_key(dsa: *mut DSA) -> c_int; -+ pub fn i2d_DSAPublicKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int; -+ pub fn i2d_DSAPrivateKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int; -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn DSA_get0_pqg( -+ d: *const DSA, -+ p: *mut *const BIGNUM, -+ q: *mut *const BIGNUM, -+ q: *mut *const BIGNUM, -+ ); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn DSA_set0_pqg( -+ d: *mut DSA, -+ p: *mut BIGNUM, -+ q: *mut BIGNUM, -+ q: *mut BIGNUM, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn DSA_get0_key( -+ d: *const DSA, -+ pub_key: *mut *const BIGNUM, -+ priv_key: *mut *const BIGNUM, -+ ); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn DSA_set0_key(d: *mut DSA, pub_key: *mut BIGNUM, priv_key: *mut BIGNUM) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_dtls1.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_dtls1.rs +++ /dev/null @@ -1,6 +0,0 @@ ---- src/vendor/openssl-sys/src/dtls1.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/dtls1.rs -@@ -0,0 +1,3 @@ -+use libc::*; -+ -+pub const DTLS1_COOKIE_LENGTH: c_uint = 256; Index: lang/rust/files/patch-src_vendor_openssl-sys_src_ec.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_ec.rs +++ /dev/null @@ -1,206 +0,0 @@ ---- src/vendor/openssl-sys/src/ec.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/ec.rs -@@ -0,0 +1,203 @@ -+use libc::*; -+ -+use *; -+ -+#[repr(C)] -+#[derive(Copy, Clone)] -+pub enum point_conversion_form_t { -+ POINT_CONVERSION_COMPRESSED = 2, -+ POINT_CONVERSION_UNCOMPRESSED = 4, -+ POINT_CONVERSION_HYBRID = 6, -+} -+ -+pub enum EC_METHOD {} -+pub enum EC_GROUP {} -+pub enum EC_POINT {} -+ -+pub const OPENSSL_EC_NAMED_CURVE: c_int = 1; -+ -+extern "C" { -+ #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -+ pub fn EC_GF2m_simple_method() -> *const EC_METHOD; -+ -+ pub fn EC_GROUP_new(meth: *const EC_METHOD) -> *mut EC_GROUP; -+ -+ pub fn EC_GROUP_free(group: *mut EC_GROUP); -+ -+ pub fn EC_GROUP_get_order( -+ group: *const EC_GROUP, -+ order: *mut BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_GROUP_set_asn1_flag(key: *mut EC_GROUP, flag: c_int); -+ -+ pub fn EC_GROUP_get_curve_GFp( -+ group: *const EC_GROUP, -+ p: *mut BIGNUM, -+ a: *mut BIGNUM, -+ b: *mut BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -+ pub fn EC_GROUP_get_curve_GF2m( -+ group: *const EC_GROUP, -+ p: *mut BIGNUM, -+ a: *mut BIGNUM, -+ b: *mut BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> c_int; -+ -+ pub fn EC_GROUP_new_curve_GFp( -+ p: *const BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> *mut EC_GROUP; -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -+ pub fn EC_GROUP_new_curve_GF2m( -+ p: *const BIGNUM, -+ a: *const BIGNUM, -+ b: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> *mut EC_GROUP; -+ -+ pub fn EC_GROUP_new_by_curve_name(nid: c_int) -> *mut EC_GROUP; -+ -+ pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; -+ -+ pub fn EC_POINT_free(point: *mut EC_POINT); -+ -+ pub fn EC_POINT_get_affine_coordinates_GFp( -+ group: *const EC_GROUP, -+ p: *const EC_POINT, -+ x: *mut BIGNUM, -+ y: *mut BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -+ pub fn EC_POINT_get_affine_coordinates_GF2m( -+ group: *const EC_GROUP, -+ p: *const EC_POINT, -+ x: *mut BIGNUM, -+ y: *mut BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_POINT_point2oct( -+ group: *const EC_GROUP, -+ p: *const EC_POINT, -+ form: point_conversion_form_t, -+ buf: *mut c_uchar, -+ len: size_t, -+ ctx: *mut BN_CTX, -+ ) -> size_t; -+ -+ pub fn EC_POINT_oct2point( -+ group: *const EC_GROUP, -+ p: *mut EC_POINT, -+ buf: *const c_uchar, -+ len: size_t, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_POINT_add( -+ group: *const EC_GROUP, -+ r: *mut EC_POINT, -+ a: *const EC_POINT, -+ b: *const EC_POINT, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_POINT_invert(group: *const EC_GROUP, r: *mut EC_POINT, ctx: *mut BN_CTX) -> c_int; -+ -+ pub fn EC_POINT_cmp( -+ group: *const EC_GROUP, -+ a: *const EC_POINT, -+ b: *const EC_POINT, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_POINT_mul( -+ group: *const EC_GROUP, -+ r: *mut EC_POINT, -+ n: *const BIGNUM, -+ q: *const EC_POINT, -+ m: *const BIGNUM, -+ ctx: *mut BN_CTX, -+ ) -> c_int; -+ -+ pub fn EC_KEY_new() -> *mut EC_KEY; -+ -+ pub fn EC_KEY_new_by_curve_name(nid: c_int) -> *mut EC_KEY; -+ -+ pub fn EC_KEY_free(key: *mut EC_KEY); -+ -+ pub fn EC_KEY_dup(key: *const EC_KEY) -> *mut EC_KEY; -+ -+ pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> c_int; -+ -+ pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; -+ -+ pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> c_int; -+ -+ pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; -+ -+ pub fn EC_KEY_set_private_key(key: *mut EC_KEY, key: *const BIGNUM) -> c_int; -+ -+ pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; -+ -+ pub fn EC_KEY_set_public_key(key: *mut EC_KEY, key: *const EC_POINT) -> c_int; -+ -+ pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> c_int; -+ -+ pub fn EC_KEY_check_key(key: *const EC_KEY) -> c_int; -+ -+ pub fn EC_KEY_set_public_key_affine_coordinates( -+ key: *mut EC_KEY, -+ x: *mut BIGNUM, -+ y: *mut BIGNUM, -+ ) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum ECDSA_SIG {} -+ } else { -+ #[repr(C)] -+ pub struct ECDSA_SIG { -+ pub r: *mut BIGNUM, -+ pub s: *mut BIGNUM, -+ } -+ } -+} -+ -+extern "C" { -+ pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; -+ -+ pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn ECDSA_SIG_get0(sig: *const ECDSA_SIG, pr: *mut *const BIGNUM, ps: *mut *const BIGNUM); -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn ECDSA_SIG_set0(sig: *mut ECDSA_SIG, pr: *mut BIGNUM, ps: *mut BIGNUM) -> c_int; -+ -+ pub fn ECDSA_do_sign( -+ dgst: *const c_uchar, -+ dgst_len: c_int, -+ eckey: *mut EC_KEY, -+ ) -> *mut ECDSA_SIG; -+ -+ pub fn ECDSA_do_verify( -+ dgst: *const c_uchar, -+ dgst_len: c_int, -+ sig: *const ECDSA_SIG, -+ eckey: *mut EC_KEY, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_err.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_err.rs +++ /dev/null @@ -1,53 +0,0 @@ ---- src/vendor/openssl-sys/src/err.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/err.rs -@@ -0,0 +1,50 @@ -+use libc::*; -+ -+pub const ERR_TXT_MALLOCED: c_int = 0x01; -+pub const ERR_TXT_STRING: c_int = 0x02; -+ -+pub const ERR_LIB_PEM: c_int = 9; -+ -+pub fn ERR_GET_LIB(l: c_ulong) -> c_int { -+ ((l >> 24) & 0x0FF) as c_int -+} -+ -+pub fn ERR_GET_FUNC(l: c_ulong) -> c_int { -+ ((l >> 12) & 0xFFF) as c_int -+} -+ -+pub fn ERR_GET_REASON(l: c_ulong) -> c_int { -+ (l & 0xFFF) as c_int -+} -+ -+#[repr(C)] -+pub struct ERR_STRING_DATA { -+ pub error: c_ulong, -+ pub string: *const c_char, -+} -+ -+extern "C" { -+ pub fn ERR_put_error(lib: c_int, func: c_int, reason: c_int, file: *const c_char, line: c_int); -+ pub fn ERR_set_error_data(data: *mut c_char, flags: c_int); -+ -+ pub fn ERR_get_error() -> c_ulong; -+ pub fn ERR_get_error_line_data( -+ file: *mut *const c_char, -+ line: *mut c_int, -+ data: *mut *const c_char, -+ flags: *mut c_int, -+ ) -> c_ulong; -+ pub fn ERR_peek_last_error() -> c_ulong; -+ pub fn ERR_clear_error(); -+ pub fn ERR_lib_error_string(err: c_ulong) -> *const c_char; -+ pub fn ERR_func_error_string(err: c_ulong) -> *const c_char; -+ pub fn ERR_reason_error_string(err: c_ulong) -> *const c_char; -+ #[cfg(ossl110)] -+ pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA) -> c_int; -+ #[cfg(not(ossl110))] -+ pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA); -+ #[cfg(not(ossl110))] -+ pub fn ERR_load_crypto_strings(); -+ -+ pub fn ERR_get_next_error_library() -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_evp.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_evp.rs +++ /dev/null @@ -1,313 +0,0 @@ ---- src/vendor/openssl-sys/src/evp.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/evp.rs -@@ -0,0 +1,310 @@ -+use libc::*; -+use *; -+ -+pub const EVP_MAX_MD_SIZE: c_uint = 64; -+ -+pub const PKCS5_SALT_LEN: c_int = 8; -+pub const PKCS12_DEFAULT_ITER: c_int = 2048; -+ -+pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption; -+pub const EVP_PKEY_DSA: c_int = NID_dsa; -+pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement; -+pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey; -+pub const EVP_PKEY_HMAC: c_int = NID_hmac; -+pub const EVP_PKEY_CMAC: c_int = NID_cmac; -+ -+pub const EVP_CTRL_GCM_SET_IVLEN: c_int = 0x9; -+pub const EVP_CTRL_GCM_GET_TAG: c_int = 0x10; -+pub const EVP_CTRL_GCM_SET_TAG: c_int = 0x11; -+ -+pub unsafe fn EVP_get_digestbynid(type_: c_int) -> *const EVP_MD { -+ EVP_get_digestbyname(OBJ_nid2sn(type_)) -+} -+ -+extern "C" { -+ pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; -+ pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); -+ } -+ } else { -+ extern "C" { -+ pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; -+ pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); -+ } -+ } -+} -+ -+extern "C" { -+ pub fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD, imple: *mut ENGINE) -+ -> c_int; -+ pub fn EVP_DigestUpdate(ctx: *mut EVP_MD_CTX, data: *const c_void, n: size_t) -> c_int; -+ pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; -+ pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD) -> c_int; -+ pub fn EVP_DigestFinal(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; -+ -+ pub fn EVP_BytesToKey( -+ typ: *const EVP_CIPHER, -+ md: *const EVP_MD, -+ salt: *const u8, -+ data: *const u8, -+ datalen: c_int, -+ count: c_int, -+ key: *mut u8, -+ iv: *mut u8, -+ ) -> c_int; -+ -+ pub fn EVP_CipherInit( -+ ctx: *mut EVP_CIPHER_CTX, -+ evp: *const EVP_CIPHER, -+ key: *const u8, -+ iv: *const u8, -+ mode: c_int, -+ ) -> c_int; -+ pub fn EVP_CipherInit_ex( -+ ctx: *mut EVP_CIPHER_CTX, -+ type_: *const EVP_CIPHER, -+ impl_: *mut ENGINE, -+ key: *const c_uchar, -+ iv: *const c_uchar, -+ enc: c_int, -+ ) -> c_int; -+ pub fn EVP_CipherUpdate( -+ ctx: *mut EVP_CIPHER_CTX, -+ outbuf: *mut u8, -+ outlen: *mut c_int, -+ inbuf: *const u8, -+ inlen: c_int, -+ ) -> c_int; -+ pub fn EVP_CipherFinal(ctx: *mut EVP_CIPHER_CTX, res: *mut u8, len: *mut c_int) -> c_int; -+ -+ pub fn EVP_DigestSignInit( -+ ctx: *mut EVP_MD_CTX, -+ pctx: *mut *mut EVP_PKEY_CTX, -+ type_: *const EVP_MD, -+ e: *mut ENGINE, -+ pkey: *mut EVP_PKEY, -+ ) -> c_int; -+ pub fn EVP_DigestSignFinal( -+ ctx: *mut EVP_MD_CTX, -+ sig: *mut c_uchar, -+ siglen: *mut size_t, -+ ) -> c_int; -+ pub fn EVP_DigestVerifyInit( -+ ctx: *mut EVP_MD_CTX, -+ pctx: *mut *mut EVP_PKEY_CTX, -+ type_: *const EVP_MD, -+ e: *mut ENGINE, -+ pkey: *mut EVP_PKEY, -+ ) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl102, libressl280))] { -+ extern "C" { -+ pub fn EVP_DigestVerifyFinal( -+ ctx: *mut EVP_MD_CTX, -+ sigret: *const c_uchar, -+ siglen: size_t, -+ ) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn EVP_DigestVerifyFinal( -+ ctx: *mut EVP_MD_CTX, -+ sigret: *mut c_uchar, -+ siglen: size_t, -+ ) -> c_int; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; -+ pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); -+ pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int; -+ pub fn EVP_CIPHER_CTX_set_key_length(ctx: *mut EVP_CIPHER_CTX, keylen: c_int) -> c_int; -+ pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int; -+ pub fn EVP_CIPHER_CTX_ctrl( -+ ctx: *mut EVP_CIPHER_CTX, -+ type_: c_int, -+ arg: c_int, -+ ptr: *mut c_void, -+ ) -> c_int; -+ -+ pub fn EVP_md5() -> *const EVP_MD; -+ pub fn EVP_sha1() -> *const EVP_MD; -+ pub fn EVP_sha224() -> *const EVP_MD; -+ pub fn EVP_sha256() -> *const EVP_MD; -+ pub fn EVP_sha384() -> *const EVP_MD; -+ pub fn EVP_sha512() -> *const EVP_MD; -+ pub fn EVP_ripemd160() -> *const EVP_MD; -+ pub fn EVP_des_ecb() -> *const EVP_CIPHER; -+ pub fn EVP_des_ede3() -> *const EVP_CIPHER; -+ pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; -+ pub fn EVP_des_cbc() -> *const EVP_CIPHER; -+ pub fn EVP_rc4() -> *const EVP_CIPHER; -+ pub fn EVP_bf_ecb() -> *const EVP_CIPHER; -+ pub fn EVP_bf_cbc() -> *const EVP_CIPHER; -+ pub fn EVP_bf_cfb64() -> *const EVP_CIPHER; -+ pub fn EVP_bf_ofb() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_ccm() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; -+ pub fn EVP_aes_128_xts() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_ccm() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; -+ pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; -+ #[cfg(ossl110)] -+ pub fn EVP_chacha20() -> *const ::EVP_CIPHER; -+ #[cfg(ossl110)] -+ pub fn EVP_chacha20_poly1305() -> *const ::EVP_CIPHER; -+ -+ #[cfg(not(ossl110))] -+ pub fn OPENSSL_add_all_algorithms_noconf(); -+ -+ pub fn EVP_get_digestbyname(name: *const c_char) -> *const EVP_MD; -+ pub fn EVP_get_cipherbyname(name: *const c_char) -> *const EVP_CIPHER; -+ -+ pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn EVP_PKEY_bits(key: *const EVP_PKEY) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int; -+ } -+ } -+} -+extern "C" { -+ pub fn EVP_PKEY_assign(pkey: *mut EVP_PKEY, typ: c_int, key: *mut c_void) -> c_int; -+ -+ pub fn EVP_PKEY_set1_RSA(k: *mut EVP_PKEY, r: *mut RSA) -> c_int; -+ pub fn EVP_PKEY_get1_RSA(k: *mut EVP_PKEY) -> *mut RSA; -+ pub fn EVP_PKEY_get1_DSA(k: *mut EVP_PKEY) -> *mut DSA; -+ pub fn EVP_PKEY_get1_DH(k: *mut EVP_PKEY) -> *mut DH; -+ pub fn EVP_PKEY_get1_EC_KEY(k: *mut EVP_PKEY) -> *mut EC_KEY; -+ -+ pub fn EVP_PKEY_new() -> *mut EVP_PKEY; -+ pub fn EVP_PKEY_free(k: *mut EVP_PKEY); -+ -+ pub fn d2i_AutoPrivateKey( -+ a: *mut *mut EVP_PKEY, -+ pp: *mut *const c_uchar, -+ length: c_long, -+ ) -> *mut EVP_PKEY; -+ -+ pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int; -+ -+ pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) -> c_int; -+ -+ pub fn PKCS5_PBKDF2_HMAC_SHA1( -+ pass: *const c_char, -+ passlen: c_int, -+ salt: *const u8, -+ saltlen: c_int, -+ iter: c_int, -+ keylen: c_int, -+ out: *mut u8, -+ ) -> c_int; -+ pub fn PKCS5_PBKDF2_HMAC( -+ pass: *const c_char, -+ passlen: c_int, -+ salt: *const c_uchar, -+ saltlen: c_int, -+ iter: c_int, -+ digest: *const EVP_MD, -+ keylen: c_int, -+ out: *mut u8, -+ ) -> c_int; -+ -+ #[cfg(ossl110)] -+ pub fn EVP_PBE_scrypt( -+ pass: *const c_char, -+ passlen: size_t, -+ salt: *const c_uchar, -+ saltlen: size_t, -+ N: u64, -+ r: u64, -+ p: u64, -+ maxmem: u64, -+ key: *mut c_uchar, -+ keylen: size_t, -+ ) -> c_int; -+} -+ -+pub const EVP_PKEY_OP_KEYGEN: c_int = 1 << 2; -+pub const EVP_PKEY_OP_SIGN: c_int = 1 << 3; -+pub const EVP_PKEY_OP_VERIFY: c_int = 1 << 4; -+pub const EVP_PKEY_OP_VERIFYRECOVER: c_int = 1 << 5; -+pub const EVP_PKEY_OP_SIGNCTX: c_int = 1 << 6; -+pub const EVP_PKEY_OP_VERIFYCTX: c_int = 1 << 7; -+pub const EVP_PKEY_OP_ENCRYPT: c_int = 1 << 8; -+pub const EVP_PKEY_OP_DECRYPT: c_int = 1 << 9; -+ -+pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN -+ | EVP_PKEY_OP_VERIFY -+ | EVP_PKEY_OP_VERIFYRECOVER -+ | EVP_PKEY_OP_SIGNCTX -+ | EVP_PKEY_OP_VERIFYCTX; -+ -+pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT; -+ -+pub const EVP_PKEY_CTRL_SET_MAC_KEY: c_int = 6; -+ -+pub const EVP_PKEY_CTRL_CIPHER: c_int = 12; -+ -+pub const EVP_PKEY_ALG_CTRL: c_int = 0x1000; -+ -+extern "C" { -+ pub fn EVP_PKEY_CTX_new(k: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; -+ pub fn EVP_PKEY_CTX_new_id(id: c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; -+ pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); -+ -+ pub fn EVP_PKEY_CTX_ctrl( -+ ctx: *mut EVP_PKEY_CTX, -+ keytype: c_int, -+ optype: c_int, -+ cmd: c_int, -+ p1: c_int, -+ p2: *mut c_void, -+ ) -> c_int; -+ -+ pub fn EVP_PKEY_new_mac_key( -+ type_: c_int, -+ e: *mut ENGINE, -+ key: *const c_uchar, -+ keylen: c_int, -+ ) -> *mut EVP_PKEY; -+ -+ pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> c_int; -+ pub fn EVP_PKEY_derive_set_peer(ctx: *mut EVP_PKEY_CTX, peer: *mut EVP_PKEY) -> c_int; -+ pub fn EVP_PKEY_derive(ctx: *mut EVP_PKEY_CTX, key: *mut c_uchar, size: *mut size_t) -> c_int; -+ -+ pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> c_int; -+ pub fn EVP_PKEY_keygen(ctx: *mut EVP_PKEY_CTX, key: *mut *mut EVP_PKEY) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_hmac.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_hmac.rs +++ /dev/null @@ -1,33 +0,0 @@ ---- src/vendor/openssl-sys/src/hmac.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/hmac.rs -@@ -0,0 +1,30 @@ -+use libc::*; -+ -+use *; -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn HMAC_CTX_new() -> *mut HMAC_CTX; -+ pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); -+ } -+ } else { -+ extern "C" { -+ pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX); -+ pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX); -+ } -+ } -+} -+ -+extern "C" { -+ pub fn HMAC_Init_ex( -+ ctx: *mut HMAC_CTX, -+ key: *const c_void, -+ len: c_int, -+ md: *const EVP_MD, -+ impl_: *mut ENGINE, -+ ) -> c_int; -+ pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const c_uchar, len: size_t) -> c_int; -+ pub fn HMAC_Final(ctx: *mut HMAC_CTX, md: *mut c_uchar, len: *mut c_uint) -> c_int; -+ pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *mut HMAC_CTX) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_lib.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_lib.rs +++ /dev/null @@ -1,3021 +0,0 @@ ---- src/vendor/openssl-sys/src/lib.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/lib.rs -@@ -1,2881 +1,165 @@ - #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] --#![allow(dead_code, overflowing_literals)] -+#![allow(dead_code, overflowing_literals, unused_imports)] - #![doc(html_root_url = "https://docs.rs/openssl-sys/0.9")] - - extern crate libc; - --use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t, FILE}; --use std::mem; --use std::ptr; -+use libc::*; - --#[cfg(not(libressl))] --mod openssl; --#[cfg(not(libressl))] --pub use openssl::*; -+pub use aes::*; -+pub use asn1::*; -+pub use bio::*; -+pub use bn::*; -+pub use cms::*; -+pub use conf::*; -+pub use crypto::*; -+pub use dh::*; -+pub use dsa::*; -+pub use dtls1::*; -+pub use ec::*; -+pub use err::*; -+pub use evp::*; -+pub use hmac::*; -+pub use obj_mac::*; -+pub use object::*; -+pub use ocsp::*; -+pub use ossl_typ::*; -+pub use pem::*; -+pub use pkcs12::*; -+pub use rand::*; -+pub use rsa::*; -+pub use safestack::*; -+pub use sha::*; -+pub use srtp::*; -+pub use ssl::*; -+pub use ssl3::*; -+pub use stack::*; -+pub use tls1::*; -+pub use x509::*; -+pub use x509_vfy::*; -+pub use x509v3::*; - --#[cfg(libressl)] --mod libressl; --#[cfg(libressl)] --pub use libressl::*; -+#[macro_use] -+mod macros; - --pub enum ASN1_INTEGER {} --pub enum ASN1_GENERALIZEDTIME {} --pub enum ASN1_STRING {} --pub enum ASN1_BIT_STRING {} --pub enum ASN1_TIME {} --pub enum ASN1_TYPE {} --pub enum ASN1_OBJECT {} --pub enum BN_CTX {} --pub enum BN_GENCB {} --pub enum CMS_ContentInfo {} --pub enum CONF {} --pub enum CONF_METHOD {} --pub enum COMP_METHOD {} --pub enum EC_KEY {} --pub enum EC_GROUP {} --pub enum EC_METHOD {} --pub enum EC_POINT {} --pub enum ENGINE {} --pub enum EVP_CIPHER_CTX {} --pub enum EVP_MD {} --pub enum EVP_PKEY_CTX {} --pub enum OCSP_BASICRESP {} --pub enum OCSP_CERTID {} --pub enum OCSP_RESPONSE {} --pub enum OCSP_REQUEST {} --pub enum OCSP_ONEREQ {} --pub enum SSL_CIPHER {} --pub enum SSL_METHOD {} --pub enum X509_CRL {} --pub enum X509_EXTENSION {} --pub enum X509_NAME {} --pub enum X509_NAME_ENTRY {} --pub enum X509_STORE {} --pub enum X509_STORE_CTX {} --pub enum bio_st {} --pub enum DH_METHOD {} --pub enum RSA_METHOD {} --pub enum BN_MONT_CTX {} --pub enum BN_BLINDING {} --pub enum DSA_METHOD {} --pub enum EVP_PKEY_ASN1_METHOD {} -+mod aes; -+mod asn1; -+mod bio; -+mod bn; -+mod cms; -+mod conf; -+mod crypto; -+mod dh; -+mod dsa; -+mod dtls1; -+mod ec; -+mod err; -+mod evp; -+mod hmac; -+mod obj_mac; -+mod object; -+mod ocsp; -+mod ossl_typ; -+mod pem; -+mod pkcs12; -+mod rand; -+mod rsa; -+mod safestack; -+mod sha; -+mod srtp; -+mod ssl; -+mod ssl3; -+mod stack; -+mod tls1; -+mod x509; -+mod x509_vfy; -+mod x509v3; - --pub type bio_info_cb = -- Option; --pub type GEN_SESSION_CB = -- Option c_int>; --pub type tls_session_ticket_ext_cb_fn = -- Option c_int>; --pub type tls_session_secret_cb_fn = Option< -- unsafe extern "C" fn( -- *mut SSL, -- *mut c_void, -- *mut c_int, -- *mut stack_st_SSL_CIPHER, -- *mut *mut SSL_CIPHER, -- *mut c_void, -- ) -> c_int, -->; -- --#[repr(C)] --#[derive(Copy, Clone)] --pub enum point_conversion_form_t { -- POINT_CONVERSION_COMPRESSED = 2, -- POINT_CONVERSION_UNCOMPRESSED = 4, -- POINT_CONVERSION_HYBRID = 6, --} -- --#[repr(C)] --pub struct AES_KEY { -- // There is some business with AES_LONG which is there to ensure the values here are 32 bits -- rd_key: [u32; 4 * (AES_MAXNR as usize + 1)], -- rounds: c_int, --} -- --#[repr(C)] --pub struct GENERAL_NAME { -- pub type_: c_int, -- pub d: *mut c_void, --} -- --#[repr(C)] --pub struct X509V3_CTX { -- flags: c_int, -- issuer_cert: *mut c_void, -- subject_cert: *mut c_void, -- subject_req: *mut c_void, -- crl: *mut c_void, -- db_meth: *mut c_void, -- db: *mut c_void, -- // I like the last comment line, it is copied from OpenSSL sources: -- // Maybe more here --} -- --#[repr(C)] --pub struct SHA_CTX { -- pub h0: SHA_LONG, -- pub h1: SHA_LONG, -- pub h2: SHA_LONG, -- pub h3: SHA_LONG, -- pub h4: SHA_LONG, -- pub Nl: SHA_LONG, -- pub Nh: SHA_LONG, -- pub data: [SHA_LONG; SHA_LBLOCK as usize], -- pub num: c_uint, --} -- --#[repr(C)] --pub struct SHA256_CTX { -- pub h: [SHA_LONG; 8], -- pub Nl: SHA_LONG, -- pub Nh: SHA_LONG, -- pub data: [SHA_LONG; SHA_LBLOCK as usize], -- pub num: c_uint, -- pub md_len: c_uint, --} -- --#[repr(C)] --pub struct SHA512_CTX { -- pub h: [SHA_LONG64; 8], -- pub Nl: SHA_LONG64, -- pub Nh: SHA_LONG64, -- // this is a union but we don't want to require 1.19 -- u: [SHA_LONG64; SHA_LBLOCK as usize], -- pub num: c_uint, -- pub md_len: c_uint, --} -- --#[cfg(target_pointer_width = "64")] --pub type BN_ULONG = libc::c_ulonglong; --#[cfg(target_pointer_width = "32")] --pub type BN_ULONG = c_uint; -- --pub type CRYPTO_EX_new = unsafe extern "C" fn( -- parent: *mut c_void, -- ptr: *mut c_void, -- ad: *const CRYPTO_EX_DATA, -- idx: c_int, -- argl: c_long, -- argp: *const c_void, --) -> c_int; --pub type CRYPTO_EX_dup = unsafe extern "C" fn( -- to: *mut CRYPTO_EX_DATA, -- from: *mut CRYPTO_EX_DATA, -- from_d: *mut c_void, -- idx: c_int, -- argl: c_long, -- argp: *mut c_void, --) -> c_int; --pub type CRYPTO_EX_free = unsafe extern "C" fn( -- parent: *mut c_void, -- ptr: *mut c_void, -- ad: *mut CRYPTO_EX_DATA, -- idx: c_int, -- argl: c_long, -- argp: *mut c_void, --); -+// FIXME remove - pub type PasswordCallback = - unsafe extern "C" fn(buf: *mut c_char, size: c_int, rwflag: c_int, user_data: *mut c_void) - -> c_int; - --#[repr(C)] --pub struct ERR_STRING_DATA { -- pub error: c_ulong, -- pub string: *const c_char, --} -+#[cfg(ossl110)] -+pub fn init() { -+ use std::ptr; -+ use std::sync::{Once, ONCE_INIT}; - --pub type SHA_LONG = c_uint; --pub type SHA_LONG64 = u64; -+ // explicitly initialize to work around https://github.com/openssl/openssl/issues/3505 -+ static INIT: Once = ONCE_INIT; - --pub const AES_ENCRYPT: c_int = 1; --pub const AES_DECRYPT: c_int = 0; -- --pub const AES_MAXNR: c_int = 14; --pub const AES_BLOCK_SIZE: c_int = 16; -- --pub const BIO_TYPE_NONE: c_int = 0; -- --pub const BIO_CTRL_EOF: c_int = 2; --pub const BIO_CTRL_INFO: c_int = 3; --pub const BIO_CTRL_FLUSH: c_int = 11; --pub const BIO_C_SET_BUF_MEM_EOF_RETURN: c_int = 130; -- --pub const BIO_FLAGS_READ: c_int = 0x01; --pub const BIO_FLAGS_WRITE: c_int = 0x02; --pub const BIO_FLAGS_IO_SPECIAL: c_int = 0x04; --pub const BIO_FLAGS_RWS: c_int = BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL; --pub const BIO_FLAGS_SHOULD_RETRY: c_int = 0x08; -- --pub const CRYPTO_LOCK: c_int = 1; -- --pub const ERR_TXT_MALLOCED: c_int = 0x01; --pub const ERR_TXT_STRING: c_int = 0x02; -- --pub const ERR_LIB_PEM: c_int = 9; --pub const PEM_R_NO_START_LINE: c_int = 108; -- --pub const EVP_MAX_MD_SIZE: c_uint = 64; --pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption; --pub const EVP_PKEY_HMAC: c_int = NID_hmac; --pub const EVP_PKEY_CMAC: c_int = NID_cmac; --pub const EVP_PKEY_DSA: c_int = NID_dsa; --pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement; --pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey; -- --pub const EVP_PKEY_ALG_CTRL: c_int = 0x1000; -- --pub const EVP_PKEY_CTRL_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 1; --pub const EVP_PKEY_CTRL_RSA_PSS_SALTLEN: c_int = EVP_PKEY_ALG_CTRL + 2; -- --pub const EVP_PKEY_CTRL_RSA_MGF1_MD: c_int = EVP_PKEY_ALG_CTRL + 5; --pub const EVP_PKEY_CTRL_GET_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 6; -- --pub const EVP_PKEY_CTRL_SET_MAC_KEY: c_int = 6; --pub const EVP_PKEY_CTRL_CIPHER: c_int = 12; -- --pub const EVP_PKEY_OP_KEYGEN: c_int = 1 << 2; --pub const EVP_PKEY_OP_SIGN: c_int = 1 << 3; --pub const EVP_PKEY_OP_VERIFY: c_int = 1 << 4; --pub const EVP_PKEY_OP_VERIFYRECOVER: c_int = 1 << 5; --pub const EVP_PKEY_OP_SIGNCTX: c_int = 1 << 6; --pub const EVP_PKEY_OP_VERIFYCTX: c_int = 1 << 7; --pub const EVP_PKEY_OP_ENCRYPT: c_int = 1 << 8; --pub const EVP_PKEY_OP_DECRYPT: c_int = 1 << 9; -- --pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN -- | EVP_PKEY_OP_VERIFY -- | EVP_PKEY_OP_VERIFYRECOVER -- | EVP_PKEY_OP_SIGNCTX -- | EVP_PKEY_OP_VERIFYCTX; -- --pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT; -- --pub const EVP_CTRL_GCM_SET_IVLEN: c_int = 0x9; --pub const EVP_CTRL_GCM_GET_TAG: c_int = 0x10; --pub const EVP_CTRL_GCM_SET_TAG: c_int = 0x11; -- --pub const MBSTRING_ASC: c_int = MBSTRING_FLAG | 1; --pub const MBSTRING_BMP: c_int = MBSTRING_FLAG | 2; --pub const MBSTRING_FLAG: c_int = 0x1000; --pub const MBSTRING_UNIV: c_int = MBSTRING_FLAG | 4; --pub const MBSTRING_UTF8: c_int = MBSTRING_FLAG; -- --pub const NID_undef: c_int = 0; --pub const NID_itu_t: c_int = 645; --pub const NID_ccitt: c_int = 404; --pub const NID_iso: c_int = 181; --pub const NID_joint_iso_itu_t: c_int = 646; --pub const NID_joint_iso_ccitt: c_int = 393; --pub const NID_member_body: c_int = 182; --pub const NID_identified_organization: c_int = 676; --pub const NID_hmac_md5: c_int = 780; --pub const NID_hmac_sha1: c_int = 781; --pub const NID_certicom_arc: c_int = 677; --pub const NID_international_organizations: c_int = 647; --pub const NID_wap: c_int = 678; --pub const NID_wap_wsg: c_int = 679; --pub const NID_selected_attribute_types: c_int = 394; --pub const NID_clearance: c_int = 395; --pub const NID_ISO_US: c_int = 183; --pub const NID_X9_57: c_int = 184; --pub const NID_X9cm: c_int = 185; --pub const NID_dsa: c_int = 116; --pub const NID_dsaWithSHA1: c_int = 113; --pub const NID_ansi_X9_62: c_int = 405; --pub const NID_X9_62_prime_field: c_int = 406; --pub const NID_X9_62_characteristic_two_field: c_int = 407; --pub const NID_X9_62_id_characteristic_two_basis: c_int = 680; --pub const NID_X9_62_onBasis: c_int = 681; --pub const NID_X9_62_tpBasis: c_int = 682; --pub const NID_X9_62_ppBasis: c_int = 683; --pub const NID_X9_62_id_ecPublicKey: c_int = 408; --pub const NID_X9_62_c2pnb163v1: c_int = 684; --pub const NID_X9_62_c2pnb163v2: c_int = 685; --pub const NID_X9_62_c2pnb163v3: c_int = 686; --pub const NID_X9_62_c2pnb176v1: c_int = 687; --pub const NID_X9_62_c2tnb191v1: c_int = 688; --pub const NID_X9_62_c2tnb191v2: c_int = 689; --pub const NID_X9_62_c2tnb191v3: c_int = 690; --pub const NID_X9_62_c2onb191v4: c_int = 691; --pub const NID_X9_62_c2onb191v5: c_int = 692; --pub const NID_X9_62_c2pnb208w1: c_int = 693; --pub const NID_X9_62_c2tnb239v1: c_int = 694; --pub const NID_X9_62_c2tnb239v2: c_int = 695; --pub const NID_X9_62_c2tnb239v3: c_int = 696; --pub const NID_X9_62_c2onb239v4: c_int = 697; --pub const NID_X9_62_c2onb239v5: c_int = 698; --pub const NID_X9_62_c2pnb272w1: c_int = 699; --pub const NID_X9_62_c2pnb304w1: c_int = 700; --pub const NID_X9_62_c2tnb359v1: c_int = 701; --pub const NID_X9_62_c2pnb368w1: c_int = 702; --pub const NID_X9_62_c2tnb431r1: c_int = 703; --pub const NID_X9_62_prime192v1: c_int = 409; --pub const NID_X9_62_prime192v2: c_int = 410; --pub const NID_X9_62_prime192v3: c_int = 411; --pub const NID_X9_62_prime239v1: c_int = 412; --pub const NID_X9_62_prime239v2: c_int = 413; --pub const NID_X9_62_prime239v3: c_int = 414; --pub const NID_X9_62_prime256v1: c_int = 415; --pub const NID_ecdsa_with_SHA1: c_int = 416; --pub const NID_ecdsa_with_Recommended: c_int = 791; --pub const NID_ecdsa_with_Specified: c_int = 792; --pub const NID_ecdsa_with_SHA224: c_int = 793; --pub const NID_ecdsa_with_SHA256: c_int = 794; --pub const NID_ecdsa_with_SHA384: c_int = 795; --pub const NID_ecdsa_with_SHA512: c_int = 796; --pub const NID_secp112r1: c_int = 704; --pub const NID_secp112r2: c_int = 705; --pub const NID_secp128r1: c_int = 706; --pub const NID_secp128r2: c_int = 707; --pub const NID_secp160k1: c_int = 708; --pub const NID_secp160r1: c_int = 709; --pub const NID_secp160r2: c_int = 710; --pub const NID_secp192k1: c_int = 711; --pub const NID_secp224k1: c_int = 712; --pub const NID_secp224r1: c_int = 713; --pub const NID_secp256k1: c_int = 714; --pub const NID_secp384r1: c_int = 715; --pub const NID_secp521r1: c_int = 716; --pub const NID_sect113r1: c_int = 717; --pub const NID_sect113r2: c_int = 718; --pub const NID_sect131r1: c_int = 719; --pub const NID_sect131r2: c_int = 720; --pub const NID_sect163k1: c_int = 721; --pub const NID_sect163r1: c_int = 722; --pub const NID_sect163r2: c_int = 723; --pub const NID_sect193r1: c_int = 724; --pub const NID_sect193r2: c_int = 725; --pub const NID_sect233k1: c_int = 726; --pub const NID_sect233r1: c_int = 727; --pub const NID_sect239k1: c_int = 728; --pub const NID_sect283k1: c_int = 729; --pub const NID_sect283r1: c_int = 730; --pub const NID_sect409k1: c_int = 731; --pub const NID_sect409r1: c_int = 732; --pub const NID_sect571k1: c_int = 733; --pub const NID_sect571r1: c_int = 734; --pub const NID_wap_wsg_idm_ecid_wtls1: c_int = 735; --pub const NID_wap_wsg_idm_ecid_wtls3: c_int = 736; --pub const NID_wap_wsg_idm_ecid_wtls4: c_int = 737; --pub const NID_wap_wsg_idm_ecid_wtls5: c_int = 738; --pub const NID_wap_wsg_idm_ecid_wtls6: c_int = 739; --pub const NID_wap_wsg_idm_ecid_wtls7: c_int = 740; --pub const NID_wap_wsg_idm_ecid_wtls8: c_int = 741; --pub const NID_wap_wsg_idm_ecid_wtls9: c_int = 742; --pub const NID_wap_wsg_idm_ecid_wtls10: c_int = 743; --pub const NID_wap_wsg_idm_ecid_wtls11: c_int = 744; --pub const NID_wap_wsg_idm_ecid_wtls12: c_int = 745; --pub const NID_cast5_cbc: c_int = 108; --pub const NID_cast5_ecb: c_int = 109; --pub const NID_cast5_cfb64: c_int = 110; --pub const NID_cast5_ofb64: c_int = 111; --pub const NID_pbeWithMD5AndCast5_CBC: c_int = 112; --pub const NID_id_PasswordBasedMAC: c_int = 782; --pub const NID_id_DHBasedMac: c_int = 783; --pub const NID_rsadsi: c_int = 1; --pub const NID_pkcs: c_int = 2; --pub const NID_pkcs1: c_int = 186; --pub const NID_rsaEncryption: c_int = 6; --pub const NID_md2WithRSAEncryption: c_int = 7; --pub const NID_md4WithRSAEncryption: c_int = 396; --pub const NID_md5WithRSAEncryption: c_int = 8; --pub const NID_sha1WithRSAEncryption: c_int = 65; --pub const NID_rsaesOaep: c_int = 919; --pub const NID_mgf1: c_int = 911; --pub const NID_rsassaPss: c_int = 912; --pub const NID_sha256WithRSAEncryption: c_int = 668; --pub const NID_sha384WithRSAEncryption: c_int = 669; --pub const NID_sha512WithRSAEncryption: c_int = 670; --pub const NID_sha224WithRSAEncryption: c_int = 671; --pub const NID_pkcs3: c_int = 27; --pub const NID_dhKeyAgreement: c_int = 28; --pub const NID_pkcs5: c_int = 187; --pub const NID_pbeWithMD2AndDES_CBC: c_int = 9; --pub const NID_pbeWithMD5AndDES_CBC: c_int = 10; --pub const NID_pbeWithMD2AndRC2_CBC: c_int = 168; --pub const NID_pbeWithMD5AndRC2_CBC: c_int = 169; --pub const NID_pbeWithSHA1AndDES_CBC: c_int = 170; --pub const NID_pbeWithSHA1AndRC2_CBC: c_int = 68; --pub const NID_id_pbkdf2: c_int = 69; --pub const NID_pbes2: c_int = 161; --pub const NID_pbmac1: c_int = 162; --pub const NID_pkcs7: c_int = 20; --pub const NID_pkcs7_data: c_int = 21; --pub const NID_pkcs7_signed: c_int = 22; --pub const NID_pkcs7_enveloped: c_int = 23; --pub const NID_pkcs7_signedAndEnveloped: c_int = 24; --pub const NID_pkcs7_digest: c_int = 25; --pub const NID_pkcs7_encrypted: c_int = 26; --pub const NID_pkcs9: c_int = 47; --pub const NID_pkcs9_emailAddress: c_int = 48; --pub const NID_pkcs9_unstructuredName: c_int = 49; --pub const NID_pkcs9_contentType: c_int = 50; --pub const NID_pkcs9_messageDigest: c_int = 51; --pub const NID_pkcs9_signingTime: c_int = 52; --pub const NID_pkcs9_countersignature: c_int = 53; --pub const NID_pkcs9_challengePassword: c_int = 54; --pub const NID_pkcs9_unstructuredAddress: c_int = 55; --pub const NID_pkcs9_extCertAttributes: c_int = 56; --pub const NID_ext_req: c_int = 172; --pub const NID_SMIMECapabilities: c_int = 167; --pub const NID_SMIME: c_int = 188; --pub const NID_id_smime_mod: c_int = 189; --pub const NID_id_smime_ct: c_int = 190; --pub const NID_id_smime_aa: c_int = 191; --pub const NID_id_smime_alg: c_int = 192; --pub const NID_id_smime_cd: c_int = 193; --pub const NID_id_smime_spq: c_int = 194; --pub const NID_id_smime_cti: c_int = 195; --pub const NID_id_smime_mod_cms: c_int = 196; --pub const NID_id_smime_mod_ess: c_int = 197; --pub const NID_id_smime_mod_oid: c_int = 198; --pub const NID_id_smime_mod_msg_v3: c_int = 199; --pub const NID_id_smime_mod_ets_eSignature_88: c_int = 200; --pub const NID_id_smime_mod_ets_eSignature_97: c_int = 201; --pub const NID_id_smime_mod_ets_eSigPolicy_88: c_int = 202; --pub const NID_id_smime_mod_ets_eSigPolicy_97: c_int = 203; --pub const NID_id_smime_ct_receipt: c_int = 204; --pub const NID_id_smime_ct_authData: c_int = 205; --pub const NID_id_smime_ct_publishCert: c_int = 206; --pub const NID_id_smime_ct_TSTInfo: c_int = 207; --pub const NID_id_smime_ct_TDTInfo: c_int = 208; --pub const NID_id_smime_ct_contentInfo: c_int = 209; --pub const NID_id_smime_ct_DVCSRequestData: c_int = 210; --pub const NID_id_smime_ct_DVCSResponseData: c_int = 211; --pub const NID_id_smime_ct_compressedData: c_int = 786; --pub const NID_id_ct_asciiTextWithCRLF: c_int = 787; --pub const NID_id_smime_aa_receiptRequest: c_int = 212; --pub const NID_id_smime_aa_securityLabel: c_int = 213; --pub const NID_id_smime_aa_mlExpandHistory: c_int = 214; --pub const NID_id_smime_aa_contentHint: c_int = 215; --pub const NID_id_smime_aa_msgSigDigest: c_int = 216; --pub const NID_id_smime_aa_encapContentType: c_int = 217; --pub const NID_id_smime_aa_contentIdentifier: c_int = 218; --pub const NID_id_smime_aa_macValue: c_int = 219; --pub const NID_id_smime_aa_equivalentLabels: c_int = 220; --pub const NID_id_smime_aa_contentReference: c_int = 221; --pub const NID_id_smime_aa_encrypKeyPref: c_int = 222; --pub const NID_id_smime_aa_signingCertificate: c_int = 223; --pub const NID_id_smime_aa_smimeEncryptCerts: c_int = 224; --pub const NID_id_smime_aa_timeStampToken: c_int = 225; --pub const NID_id_smime_aa_ets_sigPolicyId: c_int = 226; --pub const NID_id_smime_aa_ets_commitmentType: c_int = 227; --pub const NID_id_smime_aa_ets_signerLocation: c_int = 228; --pub const NID_id_smime_aa_ets_signerAttr: c_int = 229; --pub const NID_id_smime_aa_ets_otherSigCert: c_int = 230; --pub const NID_id_smime_aa_ets_contentTimestamp: c_int = 231; --pub const NID_id_smime_aa_ets_CertificateRefs: c_int = 232; --pub const NID_id_smime_aa_ets_RevocationRefs: c_int = 233; --pub const NID_id_smime_aa_ets_certValues: c_int = 234; --pub const NID_id_smime_aa_ets_revocationValues: c_int = 235; --pub const NID_id_smime_aa_ets_escTimeStamp: c_int = 236; --pub const NID_id_smime_aa_ets_certCRLTimestamp: c_int = 237; --pub const NID_id_smime_aa_ets_archiveTimeStamp: c_int = 238; --pub const NID_id_smime_aa_signatureType: c_int = 239; --pub const NID_id_smime_aa_dvcs_dvc: c_int = 240; --pub const NID_id_smime_alg_ESDHwith3DES: c_int = 241; --pub const NID_id_smime_alg_ESDHwithRC2: c_int = 242; --pub const NID_id_smime_alg_3DESwrap: c_int = 243; --pub const NID_id_smime_alg_RC2wrap: c_int = 244; --pub const NID_id_smime_alg_ESDH: c_int = 245; --pub const NID_id_smime_alg_CMS3DESwrap: c_int = 246; --pub const NID_id_smime_alg_CMSRC2wrap: c_int = 247; --pub const NID_id_alg_PWRI_KEK: c_int = 893; --pub const NID_id_smime_cd_ldap: c_int = 248; --pub const NID_id_smime_spq_ets_sqt_uri: c_int = 249; --pub const NID_id_smime_spq_ets_sqt_unotice: c_int = 250; --pub const NID_id_smime_cti_ets_proofOfOrigin: c_int = 251; --pub const NID_id_smime_cti_ets_proofOfReceipt: c_int = 252; --pub const NID_id_smime_cti_ets_proofOfDelivery: c_int = 253; --pub const NID_id_smime_cti_ets_proofOfSender: c_int = 254; --pub const NID_id_smime_cti_ets_proofOfApproval: c_int = 255; --pub const NID_id_smime_cti_ets_proofOfCreation: c_int = 256; --pub const NID_friendlyName: c_int = 156; --pub const NID_localKeyID: c_int = 157; --pub const NID_ms_csp_name: c_int = 417; --pub const NID_LocalKeySet: c_int = 856; --pub const NID_x509Certificate: c_int = 158; --pub const NID_sdsiCertificate: c_int = 159; --pub const NID_x509Crl: c_int = 160; --pub const NID_pbe_WithSHA1And128BitRC4: c_int = 144; --pub const NID_pbe_WithSHA1And40BitRC4: c_int = 145; --pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: c_int = 146; --pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: c_int = 147; --pub const NID_pbe_WithSHA1And128BitRC2_CBC: c_int = 148; --pub const NID_pbe_WithSHA1And40BitRC2_CBC: c_int = 149; --pub const NID_keyBag: c_int = 150; --pub const NID_pkcs8ShroudedKeyBag: c_int = 151; --pub const NID_certBag: c_int = 152; --pub const NID_crlBag: c_int = 153; --pub const NID_secretBag: c_int = 154; --pub const NID_safeContentsBag: c_int = 155; --pub const NID_md2: c_int = 3; --pub const NID_md4: c_int = 257; --pub const NID_md5: c_int = 4; --pub const NID_md5_sha1: c_int = 114; --pub const NID_hmacWithMD5: c_int = 797; --pub const NID_hmacWithSHA1: c_int = 163; --pub const NID_hmacWithSHA224: c_int = 798; --pub const NID_hmacWithSHA256: c_int = 799; --pub const NID_hmacWithSHA384: c_int = 800; --pub const NID_hmacWithSHA512: c_int = 801; --pub const NID_rc2_cbc: c_int = 37; --pub const NID_rc2_ecb: c_int = 38; --pub const NID_rc2_cfb64: c_int = 39; --pub const NID_rc2_ofb64: c_int = 40; --pub const NID_rc2_40_cbc: c_int = 98; --pub const NID_rc2_64_cbc: c_int = 166; --pub const NID_rc4: c_int = 5; --pub const NID_rc4_40: c_int = 97; --pub const NID_des_ede3_cbc: c_int = 44; --pub const NID_rc5_cbc: c_int = 120; --pub const NID_rc5_ecb: c_int = 121; --pub const NID_rc5_cfb64: c_int = 122; --pub const NID_rc5_ofb64: c_int = 123; --pub const NID_ms_ext_req: c_int = 171; --pub const NID_ms_code_ind: c_int = 134; --pub const NID_ms_code_com: c_int = 135; --pub const NID_ms_ctl_sign: c_int = 136; --pub const NID_ms_sgc: c_int = 137; --pub const NID_ms_efs: c_int = 138; --pub const NID_ms_smartcard_login: c_int = 648; --pub const NID_ms_upn: c_int = 649; --pub const NID_idea_cbc: c_int = 34; --pub const NID_idea_ecb: c_int = 36; --pub const NID_idea_cfb64: c_int = 35; --pub const NID_idea_ofb64: c_int = 46; --pub const NID_bf_cbc: c_int = 91; --pub const NID_bf_ecb: c_int = 92; --pub const NID_bf_cfb64: c_int = 93; --pub const NID_bf_ofb64: c_int = 94; --pub const NID_id_pkix: c_int = 127; --pub const NID_id_pkix_mod: c_int = 258; --pub const NID_id_pe: c_int = 175; --pub const NID_id_qt: c_int = 259; --pub const NID_id_kp: c_int = 128; --pub const NID_id_it: c_int = 260; --pub const NID_id_pkip: c_int = 261; --pub const NID_id_alg: c_int = 262; --pub const NID_id_cmc: c_int = 263; --pub const NID_id_on: c_int = 264; --pub const NID_id_pda: c_int = 265; --pub const NID_id_aca: c_int = 266; --pub const NID_id_qcs: c_int = 267; --pub const NID_id_cct: c_int = 268; --pub const NID_id_ppl: c_int = 662; --pub const NID_id_ad: c_int = 176; --pub const NID_id_pkix1_explicit_88: c_int = 269; --pub const NID_id_pkix1_implicit_88: c_int = 270; --pub const NID_id_pkix1_explicit_93: c_int = 271; --pub const NID_id_pkix1_implicit_93: c_int = 272; --pub const NID_id_mod_crmf: c_int = 273; --pub const NID_id_mod_cmc: c_int = 274; --pub const NID_id_mod_kea_profile_88: c_int = 275; --pub const NID_id_mod_kea_profile_93: c_int = 276; --pub const NID_id_mod_cmp: c_int = 277; --pub const NID_id_mod_qualified_cert_88: c_int = 278; --pub const NID_id_mod_qualified_cert_93: c_int = 279; --pub const NID_id_mod_attribute_cert: c_int = 280; --pub const NID_id_mod_timestamp_protocol: c_int = 281; --pub const NID_id_mod_ocsp: c_int = 282; --pub const NID_id_mod_dvcs: c_int = 283; --pub const NID_id_mod_cmp2000: c_int = 284; --pub const NID_info_access: c_int = 177; --pub const NID_biometricInfo: c_int = 285; --pub const NID_qcStatements: c_int = 286; --pub const NID_ac_auditEntity: c_int = 287; --pub const NID_ac_targeting: c_int = 288; --pub const NID_aaControls: c_int = 289; --pub const NID_sbgp_ipAddrBlock: c_int = 290; --pub const NID_sbgp_autonomousSysNum: c_int = 291; --pub const NID_sbgp_routerIdentifier: c_int = 292; --pub const NID_ac_proxying: c_int = 397; --pub const NID_sinfo_access: c_int = 398; --pub const NID_proxyCertInfo: c_int = 663; --pub const NID_id_qt_cps: c_int = 164; --pub const NID_id_qt_unotice: c_int = 165; --pub const NID_textNotice: c_int = 293; --pub const NID_server_auth: c_int = 129; --pub const NID_client_auth: c_int = 130; --pub const NID_code_sign: c_int = 131; --pub const NID_email_protect: c_int = 132; --pub const NID_ipsecEndSystem: c_int = 294; --pub const NID_ipsecTunnel: c_int = 295; --pub const NID_ipsecUser: c_int = 296; --pub const NID_time_stamp: c_int = 133; --pub const NID_OCSP_sign: c_int = 180; --pub const NID_dvcs: c_int = 297; --pub const NID_id_it_caProtEncCert: c_int = 298; --pub const NID_id_it_signKeyPairTypes: c_int = 299; --pub const NID_id_it_encKeyPairTypes: c_int = 300; --pub const NID_id_it_preferredSymmAlg: c_int = 301; --pub const NID_id_it_caKeyUpdateInfo: c_int = 302; --pub const NID_id_it_currentCRL: c_int = 303; --pub const NID_id_it_unsupportedOIDs: c_int = 304; --pub const NID_id_it_subscriptionRequest: c_int = 305; --pub const NID_id_it_subscriptionResponse: c_int = 306; --pub const NID_id_it_keyPairParamReq: c_int = 307; --pub const NID_id_it_keyPairParamRep: c_int = 308; --pub const NID_id_it_revPassphrase: c_int = 309; --pub const NID_id_it_implicitConfirm: c_int = 310; --pub const NID_id_it_confirmWaitTime: c_int = 311; --pub const NID_id_it_origPKIMessage: c_int = 312; --pub const NID_id_it_suppLangTags: c_int = 784; --pub const NID_id_regCtrl: c_int = 313; --pub const NID_id_regInfo: c_int = 314; --pub const NID_id_regCtrl_regToken: c_int = 315; --pub const NID_id_regCtrl_authenticator: c_int = 316; --pub const NID_id_regCtrl_pkiPublicationInfo: c_int = 317; --pub const NID_id_regCtrl_pkiArchiveOptions: c_int = 318; --pub const NID_id_regCtrl_oldCertID: c_int = 319; --pub const NID_id_regCtrl_protocolEncrKey: c_int = 320; --pub const NID_id_regInfo_utf8Pairs: c_int = 321; --pub const NID_id_regInfo_certReq: c_int = 322; --pub const NID_id_alg_des40: c_int = 323; --pub const NID_id_alg_noSignature: c_int = 324; --pub const NID_id_alg_dh_sig_hmac_sha1: c_int = 325; --pub const NID_id_alg_dh_pop: c_int = 326; --pub const NID_id_cmc_statusInfo: c_int = 327; --pub const NID_id_cmc_identification: c_int = 328; --pub const NID_id_cmc_identityProof: c_int = 329; --pub const NID_id_cmc_dataReturn: c_int = 330; --pub const NID_id_cmc_transactionId: c_int = 331; --pub const NID_id_cmc_senderNonce: c_int = 332; --pub const NID_id_cmc_recipientNonce: c_int = 333; --pub const NID_id_cmc_addExtensions: c_int = 334; --pub const NID_id_cmc_encryptedPOP: c_int = 335; --pub const NID_id_cmc_decryptedPOP: c_int = 336; --pub const NID_id_cmc_lraPOPWitness: c_int = 337; --pub const NID_id_cmc_getCert: c_int = 338; --pub const NID_id_cmc_getCRL: c_int = 339; --pub const NID_id_cmc_revokeRequest: c_int = 340; --pub const NID_id_cmc_regInfo: c_int = 341; --pub const NID_id_cmc_responseInfo: c_int = 342; --pub const NID_id_cmc_queryPending: c_int = 343; --pub const NID_id_cmc_popLinkRandom: c_int = 344; --pub const NID_id_cmc_popLinkWitness: c_int = 345; --pub const NID_id_cmc_confirmCertAcceptance: c_int = 346; --pub const NID_id_on_personalData: c_int = 347; --pub const NID_id_on_permanentIdentifier: c_int = 858; --pub const NID_id_pda_dateOfBirth: c_int = 348; --pub const NID_id_pda_placeOfBirth: c_int = 349; --pub const NID_id_pda_gender: c_int = 351; --pub const NID_id_pda_countryOfCitizenship: c_int = 352; --pub const NID_id_pda_countryOfResidence: c_int = 353; --pub const NID_id_aca_authenticationInfo: c_int = 354; --pub const NID_id_aca_accessIdentity: c_int = 355; --pub const NID_id_aca_chargingIdentity: c_int = 356; --pub const NID_id_aca_group: c_int = 357; --pub const NID_id_aca_role: c_int = 358; --pub const NID_id_aca_encAttrs: c_int = 399; --pub const NID_id_qcs_pkixQCSyntax_v1: c_int = 359; --pub const NID_id_cct_crs: c_int = 360; --pub const NID_id_cct_PKIData: c_int = 361; --pub const NID_id_cct_PKIResponse: c_int = 362; --pub const NID_id_ppl_anyLanguage: c_int = 664; --pub const NID_id_ppl_inheritAll: c_int = 665; --pub const NID_Independent: c_int = 667; --pub const NID_ad_OCSP: c_int = 178; --pub const NID_ad_ca_issuers: c_int = 179; --pub const NID_ad_timeStamping: c_int = 363; --pub const NID_ad_dvcs: c_int = 364; --pub const NID_caRepository: c_int = 785; --pub const NID_id_pkix_OCSP_basic: c_int = 365; --pub const NID_id_pkix_OCSP_Nonce: c_int = 366; --pub const NID_id_pkix_OCSP_CrlID: c_int = 367; --pub const NID_id_pkix_OCSP_acceptableResponses: c_int = 368; --pub const NID_id_pkix_OCSP_noCheck: c_int = 369; --pub const NID_id_pkix_OCSP_archiveCutoff: c_int = 370; --pub const NID_id_pkix_OCSP_serviceLocator: c_int = 371; --pub const NID_id_pkix_OCSP_extendedStatus: c_int = 372; --pub const NID_id_pkix_OCSP_valid: c_int = 373; --pub const NID_id_pkix_OCSP_path: c_int = 374; --pub const NID_id_pkix_OCSP_trustRoot: c_int = 375; --pub const NID_algorithm: c_int = 376; --pub const NID_md5WithRSA: c_int = 104; --pub const NID_des_ecb: c_int = 29; --pub const NID_des_cbc: c_int = 31; --pub const NID_des_ofb64: c_int = 45; --pub const NID_des_cfb64: c_int = 30; --pub const NID_rsaSignature: c_int = 377; --pub const NID_dsa_2: c_int = 67; --pub const NID_dsaWithSHA: c_int = 66; --pub const NID_shaWithRSAEncryption: c_int = 42; --pub const NID_des_ede_ecb: c_int = 32; --pub const NID_des_ede3_ecb: c_int = 33; --pub const NID_des_ede_cbc: c_int = 43; --pub const NID_des_ede_cfb64: c_int = 60; --pub const NID_des_ede3_cfb64: c_int = 61; --pub const NID_des_ede_ofb64: c_int = 62; --pub const NID_des_ede3_ofb64: c_int = 63; --pub const NID_desx_cbc: c_int = 80; --pub const NID_sha: c_int = 41; --pub const NID_sha1: c_int = 64; --pub const NID_dsaWithSHA1_2: c_int = 70; --pub const NID_sha1WithRSA: c_int = 115; --pub const NID_ripemd160: c_int = 117; --pub const NID_ripemd160WithRSA: c_int = 119; --pub const NID_sxnet: c_int = 143; --pub const NID_X500: c_int = 11; --pub const NID_X509: c_int = 12; --pub const NID_commonName: c_int = 13; --pub const NID_surname: c_int = 100; --pub const NID_serialNumber: c_int = 105; --pub const NID_countryName: c_int = 14; --pub const NID_localityName: c_int = 15; --pub const NID_stateOrProvinceName: c_int = 16; --pub const NID_streetAddress: c_int = 660; --pub const NID_organizationName: c_int = 17; --pub const NID_organizationalUnitName: c_int = 18; --pub const NID_title: c_int = 106; --pub const NID_description: c_int = 107; --pub const NID_searchGuide: c_int = 859; --pub const NID_businessCategory: c_int = 860; --pub const NID_postalAddress: c_int = 861; --pub const NID_postalCode: c_int = 661; --pub const NID_postOfficeBox: c_int = 862; --pub const NID_physicalDeliveryOfficeName: c_int = 863; --pub const NID_telephoneNumber: c_int = 864; --pub const NID_telexNumber: c_int = 865; --pub const NID_teletexTerminalIdentifier: c_int = 866; --pub const NID_facsimileTelephoneNumber: c_int = 867; --pub const NID_x121Address: c_int = 868; --pub const NID_internationaliSDNNumber: c_int = 869; --pub const NID_registeredAddress: c_int = 870; --pub const NID_destinationIndicator: c_int = 871; --pub const NID_preferredDeliveryMethod: c_int = 872; --pub const NID_presentationAddress: c_int = 873; --pub const NID_supportedApplicationContext: c_int = 874; --pub const NID_member: c_int = 875; --pub const NID_owner: c_int = 876; --pub const NID_roleOccupant: c_int = 877; --pub const NID_seeAlso: c_int = 878; --pub const NID_userPassword: c_int = 879; --pub const NID_userCertificate: c_int = 880; --pub const NID_cACertificate: c_int = 881; --pub const NID_authorityRevocationList: c_int = 882; --pub const NID_certificateRevocationList: c_int = 883; --pub const NID_crossCertificatePair: c_int = 884; --pub const NID_name: c_int = 173; --pub const NID_givenName: c_int = 99; --pub const NID_initials: c_int = 101; --pub const NID_generationQualifier: c_int = 509; --pub const NID_x500UniqueIdentifier: c_int = 503; --pub const NID_dnQualifier: c_int = 174; --pub const NID_enhancedSearchGuide: c_int = 885; --pub const NID_protocolInformation: c_int = 886; --pub const NID_distinguishedName: c_int = 887; --pub const NID_uniqueMember: c_int = 888; --pub const NID_houseIdentifier: c_int = 889; --pub const NID_supportedAlgorithms: c_int = 890; --pub const NID_deltaRevocationList: c_int = 891; --pub const NID_dmdName: c_int = 892; --pub const NID_pseudonym: c_int = 510; --pub const NID_role: c_int = 400; --pub const NID_X500algorithms: c_int = 378; --pub const NID_rsa: c_int = 19; --pub const NID_mdc2WithRSA: c_int = 96; --pub const NID_mdc2: c_int = 95; --pub const NID_id_ce: c_int = 81; --pub const NID_subject_directory_attributes: c_int = 769; --pub const NID_subject_key_identifier: c_int = 82; --pub const NID_key_usage: c_int = 83; --pub const NID_private_key_usage_period: c_int = 84; --pub const NID_subject_alt_name: c_int = 85; --pub const NID_issuer_alt_name: c_int = 86; --pub const NID_basic_constraints: c_int = 87; --pub const NID_crl_number: c_int = 88; --pub const NID_crl_reason: c_int = 141; --pub const NID_invalidity_date: c_int = 142; --pub const NID_delta_crl: c_int = 140; --pub const NID_issuing_distribution_point: c_int = 770; --pub const NID_certificate_issuer: c_int = 771; --pub const NID_name_constraints: c_int = 666; --pub const NID_crl_distribution_points: c_int = 103; --pub const NID_certificate_policies: c_int = 89; --pub const NID_any_policy: c_int = 746; --pub const NID_policy_mappings: c_int = 747; --pub const NID_authority_key_identifier: c_int = 90; --pub const NID_policy_constraints: c_int = 401; --pub const NID_ext_key_usage: c_int = 126; --pub const NID_freshest_crl: c_int = 857; --pub const NID_inhibit_any_policy: c_int = 748; --pub const NID_target_information: c_int = 402; --pub const NID_no_rev_avail: c_int = 403; --pub const NID_anyExtendedKeyUsage: c_int = 910; --pub const NID_netscape: c_int = 57; --pub const NID_netscape_cert_extension: c_int = 58; --pub const NID_netscape_data_type: c_int = 59; --pub const NID_netscape_cert_type: c_int = 71; --pub const NID_netscape_base_url: c_int = 72; --pub const NID_netscape_revocation_url: c_int = 73; --pub const NID_netscape_ca_revocation_url: c_int = 74; --pub const NID_netscape_renewal_url: c_int = 75; --pub const NID_netscape_ca_policy_url: c_int = 76; --pub const NID_netscape_ssl_server_name: c_int = 77; --pub const NID_netscape_comment: c_int = 78; --pub const NID_netscape_cert_sequence: c_int = 79; --pub const NID_ns_sgc: c_int = 139; --pub const NID_org: c_int = 379; --pub const NID_dod: c_int = 380; --pub const NID_iana: c_int = 381; --pub const NID_Directory: c_int = 382; --pub const NID_Management: c_int = 383; --pub const NID_Experimental: c_int = 384; --pub const NID_Private: c_int = 385; --pub const NID_Security: c_int = 386; --pub const NID_SNMPv2: c_int = 387; --pub const NID_Mail: c_int = 388; --pub const NID_Enterprises: c_int = 389; --pub const NID_dcObject: c_int = 390; --pub const NID_mime_mhs: c_int = 504; --pub const NID_mime_mhs_headings: c_int = 505; --pub const NID_mime_mhs_bodies: c_int = 506; --pub const NID_id_hex_partial_message: c_int = 507; --pub const NID_id_hex_multipart_message: c_int = 508; --pub const NID_zlib_compression: c_int = 125; --pub const NID_aes_128_ecb: c_int = 418; --pub const NID_aes_128_cbc: c_int = 419; --pub const NID_aes_128_ofb128: c_int = 420; --pub const NID_aes_128_cfb128: c_int = 421; --pub const NID_id_aes128_wrap: c_int = 788; --pub const NID_aes_128_gcm: c_int = 895; --pub const NID_aes_128_ccm: c_int = 896; --pub const NID_id_aes128_wrap_pad: c_int = 897; --pub const NID_aes_192_ecb: c_int = 422; --pub const NID_aes_192_cbc: c_int = 423; --pub const NID_aes_192_ofb128: c_int = 424; --pub const NID_aes_192_cfb128: c_int = 425; --pub const NID_id_aes192_wrap: c_int = 789; --pub const NID_aes_192_gcm: c_int = 898; --pub const NID_aes_192_ccm: c_int = 899; --pub const NID_id_aes192_wrap_pad: c_int = 900; --pub const NID_aes_256_ecb: c_int = 426; --pub const NID_aes_256_cbc: c_int = 427; --pub const NID_aes_256_ofb128: c_int = 428; --pub const NID_aes_256_cfb128: c_int = 429; --pub const NID_id_aes256_wrap: c_int = 790; --pub const NID_aes_256_gcm: c_int = 901; --pub const NID_aes_256_ccm: c_int = 902; --pub const NID_id_aes256_wrap_pad: c_int = 903; --pub const NID_aes_128_cfb1: c_int = 650; --pub const NID_aes_192_cfb1: c_int = 651; --pub const NID_aes_256_cfb1: c_int = 652; --pub const NID_aes_128_cfb8: c_int = 653; --pub const NID_aes_192_cfb8: c_int = 654; --pub const NID_aes_256_cfb8: c_int = 655; --pub const NID_aes_128_ctr: c_int = 904; --pub const NID_aes_192_ctr: c_int = 905; --pub const NID_aes_256_ctr: c_int = 906; --pub const NID_aes_128_xts: c_int = 913; --pub const NID_aes_256_xts: c_int = 914; --pub const NID_des_cfb1: c_int = 656; --pub const NID_des_cfb8: c_int = 657; --pub const NID_des_ede3_cfb1: c_int = 658; --pub const NID_des_ede3_cfb8: c_int = 659; --pub const NID_sha256: c_int = 672; --pub const NID_sha384: c_int = 673; --pub const NID_sha512: c_int = 674; --pub const NID_sha224: c_int = 675; --pub const NID_dsa_with_SHA224: c_int = 802; --pub const NID_dsa_with_SHA256: c_int = 803; --pub const NID_hold_instruction_code: c_int = 430; --pub const NID_hold_instruction_none: c_int = 431; --pub const NID_hold_instruction_call_issuer: c_int = 432; --pub const NID_hold_instruction_reject: c_int = 433; --pub const NID_data: c_int = 434; --pub const NID_pss: c_int = 435; --pub const NID_ucl: c_int = 436; --pub const NID_pilot: c_int = 437; --pub const NID_pilotAttributeType: c_int = 438; --pub const NID_pilotAttributeSyntax: c_int = 439; --pub const NID_pilotObjectClass: c_int = 440; --pub const NID_pilotGroups: c_int = 441; --pub const NID_iA5StringSyntax: c_int = 442; --pub const NID_caseIgnoreIA5StringSyntax: c_int = 443; --pub const NID_pilotObject: c_int = 444; --pub const NID_pilotPerson: c_int = 445; --pub const NID_account: c_int = 446; --pub const NID_document: c_int = 447; --pub const NID_room: c_int = 448; --pub const NID_documentSeries: c_int = 449; --pub const NID_Domain: c_int = 392; --pub const NID_rFC822localPart: c_int = 450; --pub const NID_dNSDomain: c_int = 451; --pub const NID_domainRelatedObject: c_int = 452; --pub const NID_friendlyCountry: c_int = 453; --pub const NID_simpleSecurityObject: c_int = 454; --pub const NID_pilotOrganization: c_int = 455; --pub const NID_pilotDSA: c_int = 456; --pub const NID_qualityLabelledData: c_int = 457; --pub const NID_userId: c_int = 458; --pub const NID_textEncodedORAddress: c_int = 459; --pub const NID_rfc822Mailbox: c_int = 460; --pub const NID_info: c_int = 461; --pub const NID_favouriteDrink: c_int = 462; --pub const NID_roomNumber: c_int = 463; --pub const NID_photo: c_int = 464; --pub const NID_userClass: c_int = 465; --pub const NID_host: c_int = 466; --pub const NID_manager: c_int = 467; --pub const NID_documentIdentifier: c_int = 468; --pub const NID_documentTitle: c_int = 469; --pub const NID_documentVersion: c_int = 470; --pub const NID_documentAuthor: c_int = 471; --pub const NID_documentLocation: c_int = 472; --pub const NID_homeTelephoneNumber: c_int = 473; --pub const NID_secretary: c_int = 474; --pub const NID_otherMailbox: c_int = 475; --pub const NID_lastModifiedTime: c_int = 476; --pub const NID_lastModifiedBy: c_int = 477; --pub const NID_domainComponent: c_int = 391; --pub const NID_aRecord: c_int = 478; --pub const NID_pilotAttributeType27: c_int = 479; --pub const NID_mXRecord: c_int = 480; --pub const NID_nSRecord: c_int = 481; --pub const NID_sOARecord: c_int = 482; --pub const NID_cNAMERecord: c_int = 483; --pub const NID_associatedDomain: c_int = 484; --pub const NID_associatedName: c_int = 485; --pub const NID_homePostalAddress: c_int = 486; --pub const NID_personalTitle: c_int = 487; --pub const NID_mobileTelephoneNumber: c_int = 488; --pub const NID_pagerTelephoneNumber: c_int = 489; --pub const NID_friendlyCountryName: c_int = 490; --pub const NID_organizationalStatus: c_int = 491; --pub const NID_janetMailbox: c_int = 492; --pub const NID_mailPreferenceOption: c_int = 493; --pub const NID_buildingName: c_int = 494; --pub const NID_dSAQuality: c_int = 495; --pub const NID_singleLevelQuality: c_int = 496; --pub const NID_subtreeMinimumQuality: c_int = 497; --pub const NID_subtreeMaximumQuality: c_int = 498; --pub const NID_personalSignature: c_int = 499; --pub const NID_dITRedirect: c_int = 500; --pub const NID_audio: c_int = 501; --pub const NID_documentPublisher: c_int = 502; --pub const NID_id_set: c_int = 512; --pub const NID_set_ctype: c_int = 513; --pub const NID_set_msgExt: c_int = 514; --pub const NID_set_attr: c_int = 515; --pub const NID_set_policy: c_int = 516; --pub const NID_set_certExt: c_int = 517; --pub const NID_set_brand: c_int = 518; --pub const NID_setct_PANData: c_int = 519; --pub const NID_setct_PANToken: c_int = 520; --pub const NID_setct_PANOnly: c_int = 521; --pub const NID_setct_OIData: c_int = 522; --pub const NID_setct_PI: c_int = 523; --pub const NID_setct_PIData: c_int = 524; --pub const NID_setct_PIDataUnsigned: c_int = 525; --pub const NID_setct_HODInput: c_int = 526; --pub const NID_setct_AuthResBaggage: c_int = 527; --pub const NID_setct_AuthRevReqBaggage: c_int = 528; --pub const NID_setct_AuthRevResBaggage: c_int = 529; --pub const NID_setct_CapTokenSeq: c_int = 530; --pub const NID_setct_PInitResData: c_int = 531; --pub const NID_setct_PI_TBS: c_int = 532; --pub const NID_setct_PResData: c_int = 533; --pub const NID_setct_AuthReqTBS: c_int = 534; --pub const NID_setct_AuthResTBS: c_int = 535; --pub const NID_setct_AuthResTBSX: c_int = 536; --pub const NID_setct_AuthTokenTBS: c_int = 537; --pub const NID_setct_CapTokenData: c_int = 538; --pub const NID_setct_CapTokenTBS: c_int = 539; --pub const NID_setct_AcqCardCodeMsg: c_int = 540; --pub const NID_setct_AuthRevReqTBS: c_int = 541; --pub const NID_setct_AuthRevResData: c_int = 542; --pub const NID_setct_AuthRevResTBS: c_int = 543; --pub const NID_setct_CapReqTBS: c_int = 544; --pub const NID_setct_CapReqTBSX: c_int = 545; --pub const NID_setct_CapResData: c_int = 546; --pub const NID_setct_CapRevReqTBS: c_int = 547; --pub const NID_setct_CapRevReqTBSX: c_int = 548; --pub const NID_setct_CapRevResData: c_int = 549; --pub const NID_setct_CredReqTBS: c_int = 550; --pub const NID_setct_CredReqTBSX: c_int = 551; --pub const NID_setct_CredResData: c_int = 552; --pub const NID_setct_CredRevReqTBS: c_int = 553; --pub const NID_setct_CredRevReqTBSX: c_int = 554; --pub const NID_setct_CredRevResData: c_int = 555; --pub const NID_setct_PCertReqData: c_int = 556; --pub const NID_setct_PCertResTBS: c_int = 557; --pub const NID_setct_BatchAdminReqData: c_int = 558; --pub const NID_setct_BatchAdminResData: c_int = 559; --pub const NID_setct_CardCInitResTBS: c_int = 560; --pub const NID_setct_MeAqCInitResTBS: c_int = 561; --pub const NID_setct_RegFormResTBS: c_int = 562; --pub const NID_setct_CertReqData: c_int = 563; --pub const NID_setct_CertReqTBS: c_int = 564; --pub const NID_setct_CertResData: c_int = 565; --pub const NID_setct_CertInqReqTBS: c_int = 566; --pub const NID_setct_ErrorTBS: c_int = 567; --pub const NID_setct_PIDualSignedTBE: c_int = 568; --pub const NID_setct_PIUnsignedTBE: c_int = 569; --pub const NID_setct_AuthReqTBE: c_int = 570; --pub const NID_setct_AuthResTBE: c_int = 571; --pub const NID_setct_AuthResTBEX: c_int = 572; --pub const NID_setct_AuthTokenTBE: c_int = 573; --pub const NID_setct_CapTokenTBE: c_int = 574; --pub const NID_setct_CapTokenTBEX: c_int = 575; --pub const NID_setct_AcqCardCodeMsgTBE: c_int = 576; --pub const NID_setct_AuthRevReqTBE: c_int = 577; --pub const NID_setct_AuthRevResTBE: c_int = 578; --pub const NID_setct_AuthRevResTBEB: c_int = 579; --pub const NID_setct_CapReqTBE: c_int = 580; --pub const NID_setct_CapReqTBEX: c_int = 581; --pub const NID_setct_CapResTBE: c_int = 582; --pub const NID_setct_CapRevReqTBE: c_int = 583; --pub const NID_setct_CapRevReqTBEX: c_int = 584; --pub const NID_setct_CapRevResTBE: c_int = 585; --pub const NID_setct_CredReqTBE: c_int = 586; --pub const NID_setct_CredReqTBEX: c_int = 587; --pub const NID_setct_CredResTBE: c_int = 588; --pub const NID_setct_CredRevReqTBE: c_int = 589; --pub const NID_setct_CredRevReqTBEX: c_int = 590; --pub const NID_setct_CredRevResTBE: c_int = 591; --pub const NID_setct_BatchAdminReqTBE: c_int = 592; --pub const NID_setct_BatchAdminResTBE: c_int = 593; --pub const NID_setct_RegFormReqTBE: c_int = 594; --pub const NID_setct_CertReqTBE: c_int = 595; --pub const NID_setct_CertReqTBEX: c_int = 596; --pub const NID_setct_CertResTBE: c_int = 597; --pub const NID_setct_CRLNotificationTBS: c_int = 598; --pub const NID_setct_CRLNotificationResTBS: c_int = 599; --pub const NID_setct_BCIDistributionTBS: c_int = 600; --pub const NID_setext_genCrypt: c_int = 601; --pub const NID_setext_miAuth: c_int = 602; --pub const NID_setext_pinSecure: c_int = 603; --pub const NID_setext_pinAny: c_int = 604; --pub const NID_setext_track2: c_int = 605; --pub const NID_setext_cv: c_int = 606; --pub const NID_set_policy_root: c_int = 607; --pub const NID_setCext_hashedRoot: c_int = 608; --pub const NID_setCext_certType: c_int = 609; --pub const NID_setCext_merchData: c_int = 610; --pub const NID_setCext_cCertRequired: c_int = 611; --pub const NID_setCext_tunneling: c_int = 612; --pub const NID_setCext_setExt: c_int = 613; --pub const NID_setCext_setQualf: c_int = 614; --pub const NID_setCext_PGWYcapabilities: c_int = 615; --pub const NID_setCext_TokenIdentifier: c_int = 616; --pub const NID_setCext_Track2Data: c_int = 617; --pub const NID_setCext_TokenType: c_int = 618; --pub const NID_setCext_IssuerCapabilities: c_int = 619; --pub const NID_setAttr_Cert: c_int = 620; --pub const NID_setAttr_PGWYcap: c_int = 621; --pub const NID_setAttr_TokenType: c_int = 622; --pub const NID_setAttr_IssCap: c_int = 623; --pub const NID_set_rootKeyThumb: c_int = 624; --pub const NID_set_addPolicy: c_int = 625; --pub const NID_setAttr_Token_EMV: c_int = 626; --pub const NID_setAttr_Token_B0Prime: c_int = 627; --pub const NID_setAttr_IssCap_CVM: c_int = 628; --pub const NID_setAttr_IssCap_T2: c_int = 629; --pub const NID_setAttr_IssCap_Sig: c_int = 630; --pub const NID_setAttr_GenCryptgrm: c_int = 631; --pub const NID_setAttr_T2Enc: c_int = 632; --pub const NID_setAttr_T2cleartxt: c_int = 633; --pub const NID_setAttr_TokICCsig: c_int = 634; --pub const NID_setAttr_SecDevSig: c_int = 635; --pub const NID_set_brand_IATA_ATA: c_int = 636; --pub const NID_set_brand_Diners: c_int = 637; --pub const NID_set_brand_AmericanExpress: c_int = 638; --pub const NID_set_brand_JCB: c_int = 639; --pub const NID_set_brand_Visa: c_int = 640; --pub const NID_set_brand_MasterCard: c_int = 641; --pub const NID_set_brand_Novus: c_int = 642; --pub const NID_des_cdmf: c_int = 643; --pub const NID_rsaOAEPEncryptionSET: c_int = 644; --pub const NID_ipsec3: c_int = 749; --pub const NID_ipsec4: c_int = 750; --pub const NID_whirlpool: c_int = 804; --pub const NID_cryptopro: c_int = 805; --pub const NID_cryptocom: c_int = 806; --pub const NID_id_GostR3411_94_with_GostR3410_2001: c_int = 807; --pub const NID_id_GostR3411_94_with_GostR3410_94: c_int = 808; --pub const NID_id_GostR3411_94: c_int = 809; --pub const NID_id_HMACGostR3411_94: c_int = 810; --pub const NID_id_GostR3410_2001: c_int = 811; --pub const NID_id_GostR3410_94: c_int = 812; --pub const NID_id_Gost28147_89: c_int = 813; --pub const NID_gost89_cnt: c_int = 814; --pub const NID_id_Gost28147_89_MAC: c_int = 815; --pub const NID_id_GostR3411_94_prf: c_int = 816; --pub const NID_id_GostR3410_2001DH: c_int = 817; --pub const NID_id_GostR3410_94DH: c_int = 818; --pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: c_int = 819; --pub const NID_id_Gost28147_89_None_KeyMeshing: c_int = 820; --pub const NID_id_GostR3411_94_TestParamSet: c_int = 821; --pub const NID_id_GostR3411_94_CryptoProParamSet: c_int = 822; --pub const NID_id_Gost28147_89_TestParamSet: c_int = 823; --pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: c_int = 824; --pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: c_int = 825; --pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: c_int = 826; --pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: c_int = 827; --pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: c_int = 828; --pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: c_int = 829; --pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: c_int = 830; --pub const NID_id_GostR3410_94_TestParamSet: c_int = 831; --pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: c_int = 832; --pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: c_int = 833; --pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: c_int = 834; --pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: c_int = 835; --pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: c_int = 836; --pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: c_int = 837; --pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: c_int = 838; --pub const NID_id_GostR3410_2001_TestParamSet: c_int = 839; --pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: c_int = 840; --pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: c_int = 841; --pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: c_int = 842; --pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: c_int = 843; --pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: c_int = 844; --pub const NID_id_GostR3410_94_a: c_int = 845; --pub const NID_id_GostR3410_94_aBis: c_int = 846; --pub const NID_id_GostR3410_94_b: c_int = 847; --pub const NID_id_GostR3410_94_bBis: c_int = 848; --pub const NID_id_Gost28147_89_cc: c_int = 849; --pub const NID_id_GostR3410_94_cc: c_int = 850; --pub const NID_id_GostR3410_2001_cc: c_int = 851; --pub const NID_id_GostR3411_94_with_GostR3410_94_cc: c_int = 852; --pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: c_int = 853; --pub const NID_id_GostR3410_2001_ParamSet_cc: c_int = 854; --pub const NID_camellia_128_cbc: c_int = 751; --pub const NID_camellia_192_cbc: c_int = 752; --pub const NID_camellia_256_cbc: c_int = 753; --pub const NID_id_camellia128_wrap: c_int = 907; --pub const NID_id_camellia192_wrap: c_int = 908; --pub const NID_id_camellia256_wrap: c_int = 909; --pub const NID_camellia_128_ecb: c_int = 754; --pub const NID_camellia_128_ofb128: c_int = 766; --pub const NID_camellia_128_cfb128: c_int = 757; --pub const NID_camellia_192_ecb: c_int = 755; --pub const NID_camellia_192_ofb128: c_int = 767; --pub const NID_camellia_192_cfb128: c_int = 758; --pub const NID_camellia_256_ecb: c_int = 756; --pub const NID_camellia_256_ofb128: c_int = 768; --pub const NID_camellia_256_cfb128: c_int = 759; --pub const NID_camellia_128_cfb1: c_int = 760; --pub const NID_camellia_192_cfb1: c_int = 761; --pub const NID_camellia_256_cfb1: c_int = 762; --pub const NID_camellia_128_cfb8: c_int = 763; --pub const NID_camellia_192_cfb8: c_int = 764; --pub const NID_camellia_256_cfb8: c_int = 765; --pub const NID_kisa: c_int = 773; --pub const NID_seed_ecb: c_int = 776; --pub const NID_seed_cbc: c_int = 777; --pub const NID_seed_cfb128: c_int = 779; --pub const NID_seed_ofb128: c_int = 778; --pub const NID_hmac: c_int = 855; --pub const NID_cmac: c_int = 894; --pub const NID_rc4_hmac_md5: c_int = 915; --pub const NID_aes_128_cbc_hmac_sha1: c_int = 916; --pub const NID_aes_192_cbc_hmac_sha1: c_int = 917; --pub const NID_aes_256_cbc_hmac_sha1: c_int = 918; -- --pub const OCSP_NOCERTS: c_ulong = 0x1; --pub const OCSP_NOINTERN: c_ulong = 0x2; --pub const OCSP_NOSIGS: c_ulong = 0x4; --pub const OCSP_NOCHAIN: c_ulong = 0x8; --pub const OCSP_NOVERIFY: c_ulong = 0x10; --pub const OCSP_NOEXPLICIT: c_ulong = 0x20; --pub const OCSP_NOCASIGN: c_ulong = 0x40; --pub const OCSP_NODELEGATED: c_ulong = 0x80; --pub const OCSP_NOCHECKS: c_ulong = 0x100; --pub const OCSP_TRUSTOTHER: c_ulong = 0x200; --pub const OCSP_RESPID_KEY: c_ulong = 0x400; --pub const OCSP_NOTIME: c_ulong = 0x800; -- --pub const V_OCSP_CERTSTATUS_GOOD: c_int = 0; --pub const V_OCSP_CERTSTATUS_REVOKED: c_int = 1; --pub const V_OCSP_CERTSTATUS_UNKNOWN: c_int = 2; -- --pub const OCSP_REVOKED_STATUS_NOSTATUS: c_int = -1; --pub const OCSP_REVOKED_STATUS_UNSPECIFIED: c_int = 0; --pub const OCSP_REVOKED_STATUS_KEYCOMPROMISE: c_int = 1; --pub const OCSP_REVOKED_STATUS_CACOMPROMISE: c_int = 2; --pub const OCSP_REVOKED_STATUS_AFFILIATIONCHANGED: c_int = 3; --pub const OCSP_REVOKED_STATUS_SUPERSEDED: c_int = 4; --pub const OCSP_REVOKED_STATUS_CESSATIONOFOPERATION: c_int = 5; --pub const OCSP_REVOKED_STATUS_CERTIFICATEHOLD: c_int = 6; --pub const OCSP_REVOKED_STATUS_REMOVEFROMCRL: c_int = 8; -- --pub const OCSP_RESPONSE_STATUS_SUCCESSFUL: c_int = 0; --pub const OCSP_RESPONSE_STATUS_MALFORMEDREQUEST: c_int = 1; --pub const OCSP_RESPONSE_STATUS_INTERNALERROR: c_int = 2; --pub const OCSP_RESPONSE_STATUS_TRYLATER: c_int = 3; --pub const OCSP_RESPONSE_STATUS_SIGREQUIRED: c_int = 5; --pub const OCSP_RESPONSE_STATUS_UNAUTHORIZED: c_int = 6; -- --pub const OPENSSL_EC_NAMED_CURVE: c_int = 1; -- --pub const PKCS5_SALT_LEN: c_int = 8; --pub const PKCS12_DEFAULT_ITER: c_int = 2048; -- --pub const RSA_F4: c_long = 0x10001; -- --pub const RSA_PKCS1_PADDING: c_int = 1; --pub const RSA_SSLV23_PADDING: c_int = 2; --pub const RSA_NO_PADDING: c_int = 3; --pub const RSA_PKCS1_OAEP_PADDING: c_int = 4; --pub const RSA_X931_PADDING: c_int = 5; --pub const RSA_PKCS1_PSS_PADDING: c_int = 6; -- --pub const SHA_LBLOCK: c_int = 16; -- --pub const SSL3_AD_ILLEGAL_PARAMETER: c_int = 47; --pub const SSL_AD_ILLEGAL_PARAMETER: c_int = SSL3_AD_ILLEGAL_PARAMETER; -- --pub const TLS1_AD_DECODE_ERROR: c_int = 50; --pub const SSL_AD_DECODE_ERROR: c_int = TLS1_AD_DECODE_ERROR; -- --pub const TLS1_AD_UNRECOGNIZED_NAME: c_int = 112; --pub const SSL_AD_UNRECOGNIZED_NAME: c_int = TLS1_AD_UNRECOGNIZED_NAME; -- --pub const SSL_CTRL_SET_TMP_DH: c_int = 3; --pub const SSL_CTRL_SET_TMP_ECDH: c_int = 4; --pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14; --pub const SSL_CTRL_MODE: c_int = 33; --pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41; --pub const SSL_CTRL_SET_SESS_CACHE_MODE: c_int = 44; --pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_CB: c_int = 53; --pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG: c_int = 54; --pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; --pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB: c_int = 63; --pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG: c_int = 64; --pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE: c_int = 65; --pub const SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 70; --pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 71; --pub const SSL_CTRL_GET_EXTRA_CHAIN_CERTS: c_int = 82; -- --pub const SSL_MODE_ENABLE_PARTIAL_WRITE: c_long = 0x1; --pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: c_long = 0x2; --pub const SSL_MODE_AUTO_RETRY: c_long = 0x4; --pub const SSL_MODE_NO_AUTO_CHAIN: c_long = 0x8; --pub const SSL_MODE_RELEASE_BUFFERS: c_long = 0x10; -- --pub const SSL_ERROR_NONE: c_int = 0; --pub const SSL_ERROR_SSL: c_int = 1; --pub const SSL_ERROR_SYSCALL: c_int = 5; --pub const SSL_ERROR_WANT_ACCEPT: c_int = 8; --pub const SSL_ERROR_WANT_CONNECT: c_int = 7; --pub const SSL_ERROR_WANT_READ: c_int = 2; --pub const SSL_ERROR_WANT_WRITE: c_int = 3; --pub const SSL_ERROR_WANT_X509_LOOKUP: c_int = 4; --pub const SSL_ERROR_ZERO_RETURN: c_int = 6; --pub const SSL_VERIFY_NONE: c_int = 0; --pub const SSL_VERIFY_PEER: c_int = 1; --pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; -- --#[cfg(any(ossl102, all(libressl, not(libressl261))))] --pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x00000010; --#[cfg(libressl261)] --pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x0; --pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800; --#[cfg(not(libressl261))] --pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000; --#[cfg(libressl261)] --pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x0; --pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004; --#[cfg(not(any(libressl, ossl110f)))] --pub const SSL_OP_ALL: c_ulong = 0x80000BFF; --#[cfg(ossl110f)] --pub const SSL_OP_ALL: c_ulong = SSL_OP_CRYPTOPRO_TLSEXT_BUG -- | SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS -- | SSL_OP_LEGACY_SERVER_CONNECT -- | SSL_OP_TLSEXT_PADDING -- | SSL_OP_SAFARI_ECDHE_ECDSA_BUG; --pub const SSL_OP_NO_QUERY_MTU: c_ulong = 0x00001000; --pub const SSL_OP_COOKIE_EXCHANGE: c_ulong = 0x00002000; --pub const SSL_OP_NO_TICKET: c_ulong = 0x00004000; --pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: c_ulong = 0x00010000; --pub const SSL_OP_CIPHER_SERVER_PREFERENCE: c_ulong = 0x00400000; --pub const SSL_OP_TLS_ROLLBACK_BUG: c_ulong = 0x00800000; --pub const SSL_OP_NO_TLSv1: c_ulong = 0x04000000; --pub const SSL_OP_NO_TLSv1_1: c_ulong = 0x10000000; --pub const SSL_OP_NO_TLSv1_2: c_ulong = 0x08000000; -- --#[cfg(all(ossl102, not(ossl111)))] --pub const SSL_OP_NO_SSL_MASK: c_ulong = -- SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2; --#[cfg(ossl111)] --pub const SSL_OP_NO_SSL_MASK: c_ulong = SSL_OP_NO_SSLv2 -- | SSL_OP_NO_SSLv3 -- | SSL_OP_NO_TLSv1 -- | SSL_OP_NO_TLSv1_1 -- | SSL_OP_NO_TLSv1_2 -- | SSL_OP_NO_TLSv1_3; -- --pub const SSL_FILETYPE_PEM: c_int = X509_FILETYPE_PEM; --pub const SSL_FILETYPE_ASN1: c_int = X509_FILETYPE_ASN1; -- --pub const SSL_SESS_CACHE_OFF: c_long = 0; --pub const SSL_SESS_CACHE_CLIENT: c_long = 0x1; --pub const SSL_SESS_CACHE_SERVER: c_long = 0x2; --pub const SSL_SESS_CACHE_BOTH: c_long = SSL_SESS_CACHE_CLIENT | SSL_SESS_CACHE_SERVER; --pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: c_long = 0x80; --pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: c_long = 0x100; --pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: c_long = 0x200; --pub const SSL_SESS_CACHE_NO_INTERNAL: c_long = -- SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | SSL_SESS_CACHE_NO_INTERNAL_STORE; -- --pub const SSL3_VERSION: c_int = 0x300; --pub const TLS1_VERSION: c_int = 0x301; --pub const TLS1_1_VERSION: c_int = 0x302; --pub const TLS1_2_VERSION: c_int = 0x303; -- --pub const TLSEXT_NAMETYPE_host_name: c_int = 0; -- --pub const TLSEXT_STATUSTYPE_ocsp: c_int = 1; -- --pub const SSL_TLSEXT_ERR_OK: c_int = 0; --pub const SSL_TLSEXT_ERR_ALERT_WARNING: c_int = 1; --pub const SSL_TLSEXT_ERR_ALERT_FATAL: c_int = 2; --pub const SSL_TLSEXT_ERR_NOACK: c_int = 3; -- --pub const OPENSSL_NPN_UNSUPPORTED: c_int = 0; --pub const OPENSSL_NPN_NEGOTIATED: c_int = 1; --pub const OPENSSL_NPN_NO_OVERLAP: c_int = 2; -- --pub const V_ASN1_GENERALIZEDTIME: c_int = 24; --pub const V_ASN1_UTCTIME: c_int = 23; -- --pub const X509_FILETYPE_ASN1: c_int = 2; --pub const X509_FILETYPE_DEFAULT: c_int = 3; --pub const X509_FILETYPE_PEM: c_int = 1; -- --pub const X509_V_OK: c_int = 0; --pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_int = 2; --pub const X509_V_ERR_UNABLE_TO_GET_CRL: c_int = 3; --pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: c_int = 4; --pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: c_int = 5; --pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: c_int = 6; --pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: c_int = 7; --pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: c_int = 8; --pub const X509_V_ERR_CERT_NOT_YET_VALID: c_int = 9; --pub const X509_V_ERR_CERT_HAS_EXPIRED: c_int = 10; --pub const X509_V_ERR_CRL_NOT_YET_VALID: c_int = 11; --pub const X509_V_ERR_CRL_HAS_EXPIRED: c_int = 12; --pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: c_int = 13; --pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: c_int = 14; --pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: c_int = 15; --pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: c_int = 16; --pub const X509_V_ERR_OUT_OF_MEM: c_int = 17; --pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: c_int = 18; --pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: c_int = 19; --pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: c_int = 20; --pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: c_int = 21; --pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: c_int = 22; --pub const X509_V_ERR_CERT_REVOKED: c_int = 23; --pub const X509_V_ERR_INVALID_CA: c_int = 24; --pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: c_int = 25; --pub const X509_V_ERR_INVALID_PURPOSE: c_int = 26; --pub const X509_V_ERR_CERT_UNTRUSTED: c_int = 27; --pub const X509_V_ERR_CERT_REJECTED: c_int = 28; --pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: c_int = 29; --pub const X509_V_ERR_AKID_SKID_MISMATCH: c_int = 30; --pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: c_int = 31; --pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: c_int = 32; --pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: c_int = 33; --pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: c_int = 34; --pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: c_int = 35; --pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: c_int = 36; --pub const X509_V_ERR_INVALID_NON_CA: c_int = 37; --pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: c_int = 38; --pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: c_int = 39; --pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: c_int = 40; --pub const X509_V_ERR_INVALID_EXTENSION: c_int = 41; --pub const X509_V_ERR_INVALID_POLICY_EXTENSION: c_int = 42; --pub const X509_V_ERR_NO_EXPLICIT_POLICY: c_int = 43; --pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: c_int = 44; --pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; --pub const X509_V_ERR_UNNESTED_RESOURCE: c_int = 46; --pub const X509_V_ERR_PERMITTED_VIOLATION: c_int = 47; --pub const X509_V_ERR_EXCLUDED_VIOLATION: c_int = 48; --pub const X509_V_ERR_SUBTREE_MINMAX: c_int = 49; --pub const X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50; --pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: c_int = 51; --pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: c_int = 52; --pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; --pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54; -- --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_INVALID_VERSION: c_int = 56; --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_INVALID_ALGORITHM: c_int = 57; --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_INVALID_CURVE: c_int = 58; --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM: c_int = 59; --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED: c_int = 60; --#[cfg(ossl102)] --pub const X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256: c_int = 61; -- --#[cfg(ossl102)] --pub const X509_V_ERR_HOSTNAME_MISMATCH: c_int = 62; --#[cfg(ossl102)] --pub const X509_V_ERR_EMAIL_MISMATCH: c_int = 63; --#[cfg(ossl102)] --pub const X509_V_ERR_IP_ADDRESS_MISMATCH: c_int = 64; -- --#[cfg(any(ossl102, libressl261))] --pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: c_uint = 0x1; --#[cfg(any(ossl102, libressl261))] --pub const X509_CHECK_FLAG_NO_WILDCARDS: c_uint = 0x2; --#[cfg(any(ossl102, libressl261))] --pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: c_uint = 0x4; --#[cfg(any(ossl102, libressl261))] --pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: c_uint = 0x8; --#[cfg(any(ossl102, libressl261))] --pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: c_uint = 0x10; -- --pub const GEN_OTHERNAME: c_int = 0; --pub const GEN_EMAIL: c_int = 1; --pub const GEN_DNS: c_int = 2; --pub const GEN_X400: c_int = 3; --pub const GEN_DIRNAME: c_int = 4; --pub const GEN_EDIPARTY: c_int = 5; --pub const GEN_URI: c_int = 6; --pub const GEN_IPADD: c_int = 7; --pub const GEN_RID: c_int = 8; -- --pub const DTLS1_COOKIE_LENGTH: c_uint = 256; -- --// 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) -+ INIT.call_once(|| unsafe { -+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, ptr::null_mut()); -+ }) - } - --pub unsafe fn BIO_clear_retry_flags(b: *mut BIO) { -- BIO_clear_flags(b, BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY) --} -+#[cfg(not(ossl110))] -+pub fn init() { -+ use std::io::{self, Write}; -+ use std::mem; -+ use std::process; -+ use std::sync::{Mutex, MutexGuard, Once, ONCE_INIT}; - --pub unsafe fn BIO_set_retry_read(b: *mut BIO) { -- BIO_set_flags(b, BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY) --} -+ static mut MUTEXES: *mut Vec> = 0 as *mut Vec>; -+ static mut GUARDS: *mut Vec>> = -+ 0 as *mut Vec>>; - --pub unsafe fn BIO_set_retry_write(b: *mut BIO) { -- BIO_set_flags(b, BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY) --} -- --pub unsafe fn EVP_get_digestbynid(type_: c_int) -> *const EVP_MD { -- EVP_get_digestbyname(OBJ_nid2sn(type_)) --} -- --// 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, -- EVP_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, -- EVP_PKEY_CTRL_GET_RSA_PADDING, -- 0, -- ppad as *mut c_void, -- ) --} -- --pub unsafe fn EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int { -- EVP_PKEY_CTX_ctrl( -- ctx, -- EVP_PKEY_RSA, -- EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY, -- EVP_PKEY_CTRL_RSA_PSS_SALTLEN, -- len, -- ptr::null_mut(), -- ) --} -- --pub unsafe fn EVP_PKEY_CTX_set_rsa_mgf1_md(ctx: *mut EVP_PKEY_CTX, md: *mut EVP_MD) -> c_int { -- EVP_PKEY_CTX_ctrl( -- ctx, -- EVP_PKEY_RSA, -- EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, -- EVP_PKEY_CTRL_RSA_MGF1_MD, -- 0, -- md 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()) --} -- --pub unsafe fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, m: c_long) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_READ_AHEAD, m, ptr::null_mut()) --} -- --pub unsafe fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *mut DH) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) --} -- --pub unsafe fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, key: *mut EC_KEY) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void) --} -- --pub unsafe fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *mut DH) -> c_long { -- SSL_ctrl(ssl, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) --} -- --pub unsafe fn SSL_set_tmp_ecdh(ssl: *mut SSL, key: *mut EC_KEY) -> c_long { -- SSL_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void) --} -- --pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void) --} -- --#[cfg(ossl102)] --pub unsafe fn SSL_CTX_set0_verify_cert_store(ctx: *mut SSL_CTX, st: *mut X509_STORE) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_VERIFY_CERT_STORE, 0, st as *mut c_void) --} -- --pub unsafe fn SSL_CTX_set_tlsext_servername_callback( -- ctx: *mut SSL_CTX, -- cb: Option, --) -> c_long { -- SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_CB, cb) --} -- --pub unsafe fn SSL_set_tlsext_host_name(s: *mut SSL, name: *mut c_char) -> c_long { -- SSL_ctrl( -- s, -- SSL_CTRL_SET_TLSEXT_HOSTNAME, -- TLSEXT_NAMETYPE_host_name as c_long, -- name as *mut c_void, -- ) --} -- --pub unsafe fn SSL_set_tlsext_status_type(s: *mut SSL, type_: c_int) -> c_long { -- SSL_ctrl( -- s, -- SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, -- type_ as c_long, -- ptr::null_mut(), -- ) --} -- --pub unsafe fn SSL_CTX_set_tlsext_status_cb( -- ctx: *mut SSL_CTX, -- cb: Option c_int>, --) -> c_long { -- SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, mem::transmute(cb)) --} -- --pub unsafe fn SSL_CTX_set_tlsext_status_arg(ctx: *mut SSL_CTX, arg: *mut c_void) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG, 0, arg) --} -- --pub unsafe fn SSL_CTX_get_extra_chain_certs( -- ctx: *mut SSL_CTX, -- chain: *mut *mut stack_st_X509, --) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_GET_EXTRA_CHAIN_CERTS, 0, chain as *mut c_void) --} -- --pub unsafe fn SSL_CTX_set_session_cache_mode(ctx: *mut SSL_CTX, m: c_long) -> c_long { -- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_SESS_CACHE_MODE, m, ptr::null_mut()) --} -- --pub unsafe fn SSL_get_tlsext_status_ocsp_resp(ssl: *mut SSL, resp: *mut *mut c_uchar) -> c_long { -- SSL_ctrl( -- ssl, -- SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP, -- 0, -- resp as *mut c_void, -- ) --} -- --pub unsafe fn SSL_set_tlsext_status_ocsp_resp( -- ssl: *mut SSL, -- resp: *mut c_uchar, -- len: c_long, --) -> c_long { -- SSL_ctrl( -- ssl, -- SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP, -- len, -- resp as *mut c_void, -- ) --} -- --pub fn ERR_GET_LIB(l: c_ulong) -> c_int { -- ((l >> 24) & 0x0FF) as c_int --} -- --pub fn ERR_GET_FUNC(l: c_ulong) -> c_int { -- ((l >> 12) & 0xFFF) as c_int --} -- --pub fn ERR_GET_REASON(l: c_ulong) -> c_int { -- (l & 0xFFF) as c_int --} -- --extern "C" { -- pub fn AES_set_encrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; -- pub fn AES_set_decrypt_key(userKey: *const c_uchar, bits: c_int, key: *mut AES_KEY) -> c_int; -- pub fn AES_ige_encrypt( -- in_: *const c_uchar, -- out: *mut c_uchar, -- length: size_t, -- key: *const AES_KEY, -- ivec: *mut c_uchar, -- enc: c_int, -- ); -- -- pub fn ASN1_INTEGER_get(dest: *const ASN1_INTEGER) -> c_long; -- pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; -- pub fn ASN1_INTEGER_to_BN(ai: *const ASN1_INTEGER, bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn ASN1_GENERALIZEDTIME_free(tm: *mut ASN1_GENERALIZEDTIME); -- pub fn ASN1_GENERALIZEDTIME_print(b: *mut BIO, tm: *const ASN1_GENERALIZEDTIME) -> c_int; -- pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; -- pub fn ASN1_TIME_free(tm: *mut ASN1_TIME); -- pub fn ASN1_TIME_print(b: *mut BIO, tm: *const ASN1_TIME) -> c_int; -- pub fn ASN1_BIT_STRING_free(x: *mut ASN1_BIT_STRING); -- pub fn ASN1_OBJECT_free(x: *mut ASN1_OBJECT); -- -- pub fn BIO_ctrl(b: *mut BIO, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -- pub fn BIO_free_all(b: *mut BIO); -- pub fn BIO_new_fp(stream: *mut FILE, close_flag: c_int) -> *mut BIO; -- pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO; -- pub fn BIO_read(b: *mut BIO, buf: *mut c_void, len: c_int) -> c_int; -- pub fn BIO_write(b: *mut BIO, buf: *const c_void, len: c_int) -> c_int; -- #[cfg(not(ossl102))] -- pub fn BIO_new_mem_buf(buf: *mut c_void, len: c_int) -> *mut BIO; -- #[cfg(ossl102)] -- pub fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO; -- pub fn BIO_set_flags(b: *mut BIO, flags: c_int); -- pub fn BIO_clear_flags(b: *mut BIO, flags: c_int); -- -- pub fn BN_CTX_new() -> *mut BN_CTX; -- pub fn BN_CTX_free(ctx: *mut BN_CTX); -- -- pub fn BN_new() -> *mut BIGNUM; -- pub fn BN_dup(n: *const BIGNUM) -> *mut BIGNUM; -- pub fn BN_clear(bn: *mut BIGNUM); -- pub fn BN_free(bn: *mut BIGNUM); -- pub fn BN_clear_free(bn: *mut BIGNUM); -- pub fn BN_num_bits(bn: *const BIGNUM) -> c_int; -- pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int); -- pub fn BN_set_word(bn: *mut BIGNUM, n: BN_ULONG) -> c_int; -- pub fn BN_add(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int; -- pub fn BN_div( -- dv: *mut BIGNUM, -- rem: *mut BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_exp(r: *mut BIGNUM, a: *const BIGNUM, p: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -- pub fn BN_gcd(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -- pub fn BN_mod_add( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_mod_exp( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- p: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_mod_inverse( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- n: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> *mut BIGNUM; -- pub fn BN_mod_mul( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_mod_sqr( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_mod_sub( -- r: *mut BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_mul(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -- pub fn BN_nnmod( -- rem: *mut BIGNUM, -- a: *const BIGNUM, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn BN_add_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -- pub fn BN_sub_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -- pub fn BN_mul_word(r: *mut BIGNUM, w: BN_ULONG) -> c_int; -- pub fn BN_div_word(r: *mut BIGNUM, w: BN_ULONG) -> BN_ULONG; -- pub fn BN_mod_word(r: *const BIGNUM, w: BN_ULONG) -> BN_ULONG; -- pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> c_int; -- pub fn BN_sub(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM) -> c_int; -- pub fn BN_clear_bit(a: *mut BIGNUM, n: c_int) -> c_int; -- pub fn BN_is_bit_set(a: *const BIGNUM, n: c_int) -> c_int; -- pub fn BN_lshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int; -- pub fn BN_lshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int; -- pub fn BN_mask_bits(a: *mut BIGNUM, n: c_int) -> c_int; -- pub fn BN_rshift(r: *mut BIGNUM, a: *const BIGNUM, n: c_int) -> c_int; -- pub fn BN_set_bit(a: *mut BIGNUM, n: c_int) -> c_int; -- pub fn BN_rshift1(r: *mut BIGNUM, a: *const BIGNUM) -> c_int; -- pub fn BN_cmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int; -- pub fn BN_ucmp(a: *const BIGNUM, b: *const BIGNUM) -> c_int; -- pub fn BN_generate_prime_ex( -- r: *mut BIGNUM, -- bits: c_int, -- safe: c_int, -- add: *const BIGNUM, -- rem: *const BIGNUM, -- cb: *mut BN_GENCB, -- ) -> c_int; -- pub fn BN_is_prime_ex( -- p: *const BIGNUM, -- checks: c_int, -- ctx: *mut BN_CTX, -- cb: *mut BN_GENCB, -- ) -> c_int; -- pub fn BN_is_prime_fasttest_ex( -- p: *const BIGNUM, -- checks: c_int, -- ctx: *mut BN_CTX, -- do_trial_division: c_int, -- cb: *mut BN_GENCB, -- ) -> c_int; -- pub fn BN_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; -- pub fn BN_pseudo_rand(r: *mut BIGNUM, bits: c_int, top: c_int, bottom: c_int) -> c_int; -- pub fn BN_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int; -- pub fn BN_pseudo_rand_range(r: *mut BIGNUM, range: *const BIGNUM) -> c_int; -- pub fn BN_bin2bn(s: *const u8, size: c_int, ret: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_bn2bin(a: *const BIGNUM, to: *mut u8) -> c_int; -- pub fn BN_dec2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int; -- pub fn BN_bn2dec(a: *const BIGNUM) -> *mut c_char; -- pub fn BN_hex2bn(a: *mut *mut BIGNUM, s: *const c_char) -> c_int; -- pub fn BN_bn2hex(a: *const BIGNUM) -> *mut c_char; -- pub fn BN_to_ASN1_INTEGER(bn: *const BIGNUM, ai: *mut ASN1_INTEGER) -> *mut ASN1_INTEGER; -- -- pub fn NCONF_default() -> *mut CONF_METHOD; -- pub fn NCONF_new(meth: *mut CONF_METHOD) -> *mut CONF; -- pub fn NCONF_free(conf: *mut CONF); -- -- pub fn CRYPTO_memcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int; -- -- pub fn DH_new() -> *mut DH; -- pub fn DH_free(dh: *mut DH); -- #[cfg(ossl102)] -- pub fn DH_get_1024_160() -> *mut DH; -- #[cfg(ossl102)] -- pub fn DH_get_2048_224() -> *mut DH; -- #[cfg(ossl102)] -- pub fn DH_get_2048_256() -> *mut DH; -- -- pub fn EC_KEY_new() -> *mut EC_KEY; -- pub fn EC_KEY_new_by_curve_name(nid: c_int) -> *mut EC_KEY; -- pub fn EC_KEY_dup(key: *const EC_KEY) -> *mut EC_KEY; -- pub fn EC_KEY_up_ref(key: *mut EC_KEY) -> c_int; -- pub fn EC_KEY_set_group(key: *mut EC_KEY, group: *const EC_GROUP) -> c_int; -- pub fn EC_KEY_get0_group(key: *const EC_KEY) -> *const EC_GROUP; -- pub fn EC_KEY_set_public_key(key: *mut EC_KEY, key: *const EC_POINT) -> c_int; -- pub fn EC_KEY_get0_public_key(key: *const EC_KEY) -> *const EC_POINT; -- pub fn EC_KEY_set_private_key(key: *mut EC_KEY, key: *const BIGNUM) -> c_int; -- pub fn EC_KEY_get0_private_key(key: *const EC_KEY) -> *const BIGNUM; -- pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> c_int; -- pub fn EC_KEY_check_key(key: *const EC_KEY) -> c_int; -- pub fn EC_KEY_free(key: *mut EC_KEY); -- pub fn EC_KEY_set_public_key_affine_coordinates( -- key: *mut EC_KEY, -- x: *mut BIGNUM, -- y: *mut BIGNUM, -- ) -> c_int; -- -- #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -- pub fn EC_GF2m_simple_method() -> *const EC_METHOD; -- -- pub fn EC_GROUP_new(meth: *const EC_METHOD) -> *mut EC_GROUP; -- pub fn EC_GROUP_new_curve_GFp( -- p: *const BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> *mut EC_GROUP; -- #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -- pub fn EC_GROUP_new_curve_GF2m( -- p: *const BIGNUM, -- a: *const BIGNUM, -- b: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> *mut EC_GROUP; -- pub fn EC_GROUP_new_by_curve_name(nid: c_int) -> *mut EC_GROUP; -- pub fn EC_GROUP_get_curve_GFp( -- group: *const EC_GROUP, -- p: *mut BIGNUM, -- a: *mut BIGNUM, -- b: *mut BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -- pub fn EC_GROUP_get_curve_GF2m( -- group: *const EC_GROUP, -- p: *mut BIGNUM, -- a: *mut BIGNUM, -- b: *mut BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_GROUP_get_degree(group: *const EC_GROUP) -> c_int; -- pub fn EC_GROUP_get_order( -- group: *const EC_GROUP, -- order: *mut BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_GROUP_set_asn1_flag(key: *mut EC_GROUP, flag: c_int); -- -- pub fn EC_GROUP_free(group: *mut EC_GROUP); -- -- pub fn EC_POINT_new(group: *const EC_GROUP) -> *mut EC_POINT; -- pub fn EC_POINT_add( -- group: *const EC_GROUP, -- r: *mut EC_POINT, -- a: *const EC_POINT, -- b: *const EC_POINT, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_POINT_mul( -- group: *const EC_GROUP, -- r: *mut EC_POINT, -- n: *const BIGNUM, -- q: *const EC_POINT, -- m: *const BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_POINT_invert(group: *const EC_GROUP, r: *mut EC_POINT, ctx: *mut BN_CTX) -> c_int; -- pub fn EC_POINT_point2oct( -- group: *const EC_GROUP, -- p: *const EC_POINT, -- form: point_conversion_form_t, -- buf: *mut c_uchar, -- len: size_t, -- ctx: *mut BN_CTX, -- ) -> size_t; -- pub fn EC_POINT_oct2point( -- group: *const EC_GROUP, -- p: *mut EC_POINT, -- buf: *const c_uchar, -- len: size_t, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_POINT_cmp( -- group: *const EC_GROUP, -- a: *const EC_POINT, -- b: *const EC_POINT, -- ctx: *mut BN_CTX, -- ) -> c_int; -- pub fn EC_POINT_free(point: *mut EC_POINT); -- pub fn EC_POINT_get_affine_coordinates_GFp( -- group: *const EC_GROUP, -- p: *const EC_POINT, -- x: *mut BIGNUM, -- y: *mut BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] -- pub fn EC_POINT_get_affine_coordinates_GF2m( -- group: *const EC_GROUP, -- p: *const EC_POINT, -- x: *mut BIGNUM, -- y: *mut BIGNUM, -- ctx: *mut BN_CTX, -- ) -> c_int; -- -- pub fn ECDSA_SIG_new() -> *mut ECDSA_SIG; -- pub fn ECDSA_SIG_free(sig: *mut ECDSA_SIG); -- pub fn ECDSA_do_verify( -- dgst: *const c_uchar, -- dgst_len: c_int, -- sig: *const ECDSA_SIG, -- eckey: *mut EC_KEY, -- ) -> c_int; -- pub fn ECDSA_do_sign( -- dgst: *const c_uchar, -- dgst_len: c_int, -- eckey: *mut EC_KEY, -- ) -> *mut ECDSA_SIG; -- -- pub fn ERR_peek_last_error() -> c_ulong; -- pub fn ERR_get_error() -> c_ulong; -- pub fn ERR_get_error_line_data( -- file: *mut *const c_char, -- line: *mut c_int, -- data: *mut *const c_char, -- flags: *mut c_int, -- ) -> c_ulong; -- pub fn ERR_lib_error_string(err: c_ulong) -> *const c_char; -- pub fn ERR_func_error_string(err: c_ulong) -> *const c_char; -- pub fn ERR_reason_error_string(err: c_ulong) -> *const c_char; -- pub fn ERR_clear_error(); -- pub fn ERR_put_error(lib: c_int, func: c_int, reason: c_int, file: *const c_char, line: c_int); -- pub fn ERR_set_error_data(data: *mut c_char, flags: c_int); -- #[cfg(ossl110)] -- pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA) -> c_int; -- #[cfg(not(ossl110))] -- pub fn ERR_load_strings(lib: c_int, str: *mut ERR_STRING_DATA); -- pub fn ERR_get_next_error_library() -> c_int; -- -- pub fn EVP_md5() -> *const EVP_MD; -- pub fn EVP_ripemd160() -> *const EVP_MD; -- pub fn EVP_sha1() -> *const EVP_MD; -- pub fn EVP_sha224() -> *const EVP_MD; -- pub fn EVP_sha256() -> *const EVP_MD; -- pub fn EVP_sha384() -> *const EVP_MD; -- pub fn EVP_sha512() -> *const EVP_MD; -- -- pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_xts() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_ctr() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_gcm() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_ccm() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_cfb1() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_cfb128() -> *const EVP_CIPHER; -- pub fn EVP_aes_128_cfb8() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_xts() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_ctr() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_gcm() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_ccm() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_cfb1() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_cfb128() -> *const EVP_CIPHER; -- pub fn EVP_aes_256_cfb8() -> *const EVP_CIPHER; -- pub fn EVP_bf_cbc() -> *const EVP_CIPHER; -- pub fn EVP_bf_ecb() -> *const EVP_CIPHER; -- pub fn EVP_bf_cfb64() -> *const EVP_CIPHER; -- pub fn EVP_bf_ofb() -> *const EVP_CIPHER; -- pub fn EVP_rc4() -> *const EVP_CIPHER; -- -- pub fn EVP_des_cbc() -> *const EVP_CIPHER; -- pub fn EVP_des_ecb() -> *const EVP_CIPHER; -- pub fn EVP_des_ede3() -> *const EVP_CIPHER; -- pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER; -- -- pub fn EVP_BytesToKey( -- typ: *const EVP_CIPHER, -- md: *const EVP_MD, -- salt: *const u8, -- data: *const u8, -- datalen: c_int, -- count: c_int, -- key: *mut u8, -- iv: *mut u8, -- ) -> c_int; -- -- pub fn EVP_CIPHER_CTX_new() -> *mut EVP_CIPHER_CTX; -- pub fn EVP_CIPHER_CTX_set_padding(ctx: *mut EVP_CIPHER_CTX, padding: c_int) -> c_int; -- pub fn EVP_CIPHER_CTX_set_key_length(ctx: *mut EVP_CIPHER_CTX, keylen: c_int) -> c_int; -- pub fn EVP_CIPHER_CTX_ctrl( -- ctx: *mut EVP_CIPHER_CTX, -- type_: c_int, -- arg: c_int, -- ptr: *mut c_void, -- ) -> c_int; -- pub fn EVP_CIPHER_CTX_free(ctx: *mut EVP_CIPHER_CTX); -- -- pub fn EVP_CipherInit( -- ctx: *mut EVP_CIPHER_CTX, -- evp: *const EVP_CIPHER, -- key: *const u8, -- iv: *const u8, -+ unsafe extern "C" fn locking_function( - mode: c_int, -- ) -> c_int; -- pub fn EVP_CipherInit_ex( -- ctx: *mut EVP_CIPHER_CTX, -- type_: *const EVP_CIPHER, -- impl_: *mut ENGINE, -- key: *const c_uchar, -- iv: *const c_uchar, -- enc: c_int, -- ) -> c_int; -- pub fn EVP_CipherUpdate( -- ctx: *mut EVP_CIPHER_CTX, -- outbuf: *mut u8, -- outlen: *mut c_int, -- inbuf: *const u8, -- inlen: c_int, -- ) -> c_int; -- pub fn EVP_CipherFinal(ctx: *mut EVP_CIPHER_CTX, res: *mut u8, len: *mut c_int) -> c_int; -+ n: c_int, -+ _file: *const c_char, -+ _line: c_int, -+ ) { -+ let mutex = &(*MUTEXES)[n as usize]; - -- pub fn EVP_DigestInit(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD) -> c_int; -- pub fn EVP_DigestInit_ex(ctx: *mut EVP_MD_CTX, typ: *const EVP_MD, imple: *mut ENGINE) -- -> c_int; -- pub fn EVP_DigestUpdate(ctx: *mut EVP_MD_CTX, data: *const c_void, n: size_t) -> c_int; -- pub fn EVP_DigestFinal(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; -- pub fn EVP_DigestFinal_ex(ctx: *mut EVP_MD_CTX, res: *mut u8, n: *mut u32) -> c_int; -+ if mode & ::CRYPTO_LOCK != 0 { -+ (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); -+ } else { -+ if let None = (*GUARDS)[n as usize].take() { -+ let _ = writeln!( -+ io::stderr(), -+ "BUG: rust-openssl lock {} already unlocked, aborting", -+ n -+ ); -+ process::abort(); -+ } -+ } -+ } - -- pub fn EVP_DigestSignInit( -- ctx: *mut EVP_MD_CTX, -- pctx: *mut *mut EVP_PKEY_CTX, -- type_: *const EVP_MD, -- e: *mut ENGINE, -- pkey: *mut EVP_PKEY, -- ) -> c_int; -- pub fn EVP_DigestSignFinal( -- ctx: *mut EVP_MD_CTX, -- sig: *mut c_uchar, -- siglen: *mut size_t, -- ) -> c_int; -- pub fn EVP_DigestVerifyInit( -- ctx: *mut EVP_MD_CTX, -- pctx: *mut *mut EVP_PKEY_CTX, -- type_: *const EVP_MD, -- e: *mut ENGINE, -- pkey: *mut EVP_PKEY, -- ) -> c_int; -- #[cfg(not(ossl102))] -- pub fn EVP_DigestVerifyFinal( -- ctx: *mut EVP_MD_CTX, -- sigret: *mut c_uchar, -- siglen: size_t, -- ) -> c_int; -- #[cfg(ossl102)] -- pub fn EVP_DigestVerifyFinal( -- ctx: *mut EVP_MD_CTX, -- sigret: *const c_uchar, -- siglen: size_t, -- ) -> c_int; -+ cfg_if! { -+ if #[cfg(unix)] { -+ fn set_id_callback() { -+ unsafe extern "C" fn thread_id() -> c_ulong { -+ ::libc::pthread_self() as c_ulong -+ } - -- pub fn EVP_MD_CTX_copy_ex(dst: *mut EVP_MD_CTX, src: *const EVP_MD_CTX) -> c_int; -+ unsafe { -+ CRYPTO_set_id_callback(thread_id); -+ } -+ } -+ } else { -+ fn set_id_callback() {} -+ } -+ } - -- pub fn EVP_PKEY_new() -> *mut EVP_PKEY; -- pub fn EVP_PKEY_free(k: *mut EVP_PKEY); -- pub fn EVP_PKEY_assign(pkey: *mut EVP_PKEY, typ: c_int, key: *mut c_void) -> c_int; -- pub fn EVP_PKEY_copy_parameters(to: *mut EVP_PKEY, from: *const EVP_PKEY) -> c_int; -- pub fn EVP_PKEY_get1_RSA(k: *mut EVP_PKEY) -> *mut RSA; -- pub fn EVP_PKEY_set1_RSA(k: *mut EVP_PKEY, r: *mut RSA) -> c_int; -- pub fn EVP_PKEY_get1_DSA(k: *mut EVP_PKEY) -> *mut DSA; -- pub fn EVP_PKEY_get1_DH(k: *mut EVP_PKEY) -> *mut DH; -- pub fn EVP_PKEY_get1_EC_KEY(k: *mut EVP_PKEY) -> *mut EC_KEY; -- pub fn EVP_PKEY_cmp(a: *const EVP_PKEY, b: *const EVP_PKEY) -> c_int; -- pub fn EVP_PKEY_id(pkey: *const EVP_PKEY) -> c_int; -- pub fn EVP_PKEY_new_mac_key( -- type_: c_int, -- e: *mut ENGINE, -- key: *const c_uchar, -- keylen: c_int, -- ) -> *mut EVP_PKEY; -- pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> c_int; -- pub fn EVP_PKEY_derive_set_peer(ctx: *mut EVP_PKEY_CTX, peer: *mut EVP_PKEY) -> c_int; -- pub fn EVP_PKEY_derive(ctx: *mut EVP_PKEY_CTX, key: *mut c_uchar, size: *mut size_t) -> c_int; -- pub fn d2i_PKCS8PrivateKey_bio( -- bp: *mut BIO, -- x: *mut *mut EVP_PKEY, -- cb: Option, -- u: *mut c_void, -- ) -> *mut EVP_PKEY; -+ static INIT: Once = ONCE_INIT; - -- pub fn EVP_PKEY_CTX_new(k: *mut EVP_PKEY, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; -- pub fn EVP_PKEY_CTX_new_id(id: c_int, e: *mut ENGINE) -> *mut EVP_PKEY_CTX; -- pub fn EVP_PKEY_CTX_free(ctx: *mut EVP_PKEY_CTX); -- pub fn EVP_PKEY_CTX_ctrl( -- ctx: *mut EVP_PKEY_CTX, -- keytype: c_int, -- optype: c_int, -- cmd: c_int, -- p1: c_int, -- p2: *mut c_void, -- ) -> c_int; -+ INIT.call_once(|| unsafe { -+ SSL_library_init(); -+ SSL_load_error_strings(); -+ OPENSSL_add_all_algorithms_noconf(); - -- pub fn EVP_PKEY_keygen_init(ctx: *mut EVP_PKEY_CTX) -> c_int; -- pub fn EVP_PKEY_keygen(ctx: *mut EVP_PKEY_CTX, key: *mut *mut EVP_PKEY) -> c_int; -+ let num_locks = ::CRYPTO_num_locks(); -+ let mut mutexes = Box::new(Vec::new()); -+ for _ in 0..num_locks { -+ mutexes.push(Mutex::new(())); -+ } -+ MUTEXES = mem::transmute(mutexes); -+ let guards: Box>>> = -+ Box::new((0..num_locks).map(|_| None).collect()); -+ GUARDS = mem::transmute(guards); - -- pub fn HMAC_CTX_copy(dst: *mut HMAC_CTX, src: *mut HMAC_CTX) -> c_int; -- -- pub fn OBJ_obj2nid(o: *const ASN1_OBJECT) -> c_int; -- pub fn OBJ_obj2txt( -- buf: *mut c_char, -- buf_len: c_int, -- a: *const ASN1_OBJECT, -- no_name: c_int, -- ) -> c_int; -- pub fn OBJ_nid2ln(nid: c_int) -> *const c_char; -- pub fn OBJ_nid2sn(nid: c_int) -> *const c_char; -- pub fn OBJ_find_sigid_algs(signid: c_int, pdig_nid: *mut c_int, ppkey_nid: *mut c_int) -- -> c_int; -- -- pub fn OCSP_BASICRESP_new() -> *mut OCSP_BASICRESP; -- pub fn OCSP_BASICRESP_free(r: *mut OCSP_BASICRESP); -- pub fn OCSP_basic_verify( -- bs: *mut OCSP_BASICRESP, -- certs: *mut stack_st_X509, -- st: *mut X509_STORE, -- flags: c_ulong, -- ) -> c_int; -- pub fn OCSP_resp_find_status( -- bs: *mut OCSP_BASICRESP, -- id: *mut OCSP_CERTID, -- status: *mut c_int, -- reason: *mut c_int, -- revtime: *mut *mut ASN1_GENERALIZEDTIME, -- thisupd: *mut *mut ASN1_GENERALIZEDTIME, -- nextupd: *mut *mut ASN1_GENERALIZEDTIME, -- ) -> c_int; -- pub fn OCSP_check_validity( -- thisupd: *mut ASN1_GENERALIZEDTIME, -- nextupd: *mut ASN1_GENERALIZEDTIME, -- sec: c_long, -- maxsec: c_long, -- ) -> c_int; -- -- pub fn OCSP_CERTID_free(id: *mut OCSP_CERTID); -- -- pub fn OCSP_RESPONSE_new() -> *mut OCSP_RESPONSE; -- pub fn OCSP_RESPONSE_free(r: *mut OCSP_RESPONSE); -- pub fn i2d_OCSP_RESPONSE(a: *mut OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int; -- pub fn d2i_OCSP_RESPONSE( -- a: *mut *mut OCSP_RESPONSE, -- pp: *mut *const c_uchar, -- length: c_long, -- ) -> *mut OCSP_RESPONSE; -- pub fn OCSP_response_create(status: c_int, bs: *mut OCSP_BASICRESP) -> *mut OCSP_RESPONSE; -- pub fn OCSP_response_status(resp: *mut OCSP_RESPONSE) -> c_int; -- pub fn OCSP_response_get1_basic(resp: *mut OCSP_RESPONSE) -> *mut OCSP_BASICRESP; -- -- pub fn OCSP_REQUEST_new() -> *mut OCSP_REQUEST; -- pub fn OCSP_REQUEST_free(r: *mut OCSP_REQUEST); -- pub fn i2d_OCSP_REQUEST(a: *mut OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int; -- pub fn d2i_OCSP_REQUEST( -- a: *mut *mut OCSP_REQUEST, -- pp: *mut *const c_uchar, -- length: c_long, -- ) -> *mut OCSP_REQUEST; -- pub fn OCSP_request_add0_id(r: *mut OCSP_REQUEST, id: *mut OCSP_CERTID) -> *mut OCSP_ONEREQ; -- -- pub fn OCSP_ONEREQ_free(r: *mut OCSP_ONEREQ); -- -- pub fn PEM_read_bio_DHparams( -- bio: *mut BIO, -- out: *mut *mut DH, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut DH; -- pub fn PEM_read_bio_X509( -- bio: *mut BIO, -- out: *mut *mut X509, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut X509; -- pub fn PEM_read_bio_X509_REQ( -- bio: *mut BIO, -- out: *mut *mut X509_REQ, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut X509_REQ; -- pub fn PEM_read_bio_PrivateKey( -- bio: *mut BIO, -- out: *mut *mut EVP_PKEY, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut EVP_PKEY; -- pub fn PEM_read_bio_PUBKEY( -- bio: *mut BIO, -- out: *mut *mut EVP_PKEY, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut EVP_PKEY; -- -- pub fn PEM_read_bio_RSAPrivateKey( -- bio: *mut BIO, -- rsa: *mut *mut RSA, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut RSA; -- -- pub fn PEM_read_bio_RSAPublicKey( -- bio: *mut BIO, -- rsa: *mut *mut RSA, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut RSA; -- -- pub fn PEM_read_bio_RSA_PUBKEY( -- bio: *mut BIO, -- rsa: *mut *mut RSA, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut RSA; -- -- pub fn PEM_write_bio_DHparams(bio: *mut BIO, x: *const DH) -> c_int; -- pub fn PEM_write_bio_PrivateKey( -- bio: *mut BIO, -- pkey: *mut EVP_PKEY, -- cipher: *const EVP_CIPHER, -- kstr: *mut c_uchar, -- klen: c_int, -- callback: Option, -- user_data: *mut c_void, -- ) -> c_int; -- pub fn PEM_write_bio_PKCS8PrivateKey( -- bio: *mut BIO, -- pkey: *mut EVP_PKEY, -- cipher: *const EVP_CIPHER, -- kstr: *mut c_char, -- klen: c_int, -- callback: Option, -- user_data: *mut c_void, -- ) -> c_int; -- pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int; -- pub fn PEM_write_bio_RSAPrivateKey( -- bp: *mut BIO, -- rsa: *mut RSA, -- cipher: *const EVP_CIPHER, -- kstr: *mut c_uchar, -- klen: c_int, -- callback: Option, -- user_data: *mut c_void, -- ) -> c_int; -- pub fn PEM_write_bio_RSAPublicKey(bp: *mut BIO, rsa: *const RSA) -> c_int; -- pub fn PEM_write_bio_RSA_PUBKEY(bp: *mut BIO, rsa: *mut RSA) -> c_int; -- -- pub fn PEM_read_bio_DSAPrivateKey( -- bp: *mut BIO, -- dsa: *mut *mut DSA, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut DSA; -- pub fn PEM_read_bio_DSA_PUBKEY( -- bp: *mut BIO, -- dsa: *mut *mut DSA, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut DSA; -- pub fn PEM_write_bio_DSAPrivateKey( -- bp: *mut BIO, -- dsa: *mut DSA, -- cipher: *const EVP_CIPHER, -- kstr: *mut c_uchar, -- klen: c_int, -- callback: Option, -- user_data: *mut c_void, -- ) -> c_int; -- pub fn PEM_write_bio_DSA_PUBKEY(bp: *mut BIO, dsa: *mut DSA) -> c_int; -- -- pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int; -- pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, x509: *mut X509_REQ) -> c_int; -- -- pub fn PEM_write_bio_ECPrivateKey( -- bio: *mut BIO, -- key: *mut EC_KEY, -- cipher: *const EVP_CIPHER, -- kstr: *mut c_uchar, -- klen: c_int, -- callback: Option, -- user_data: *mut c_void, -- ) -> c_int; -- pub fn PEM_read_bio_ECPrivateKey( -- bio: *mut BIO, -- key: *mut *mut EC_KEY, -- callback: Option, -- user_data: *mut c_void, -- ) -> *mut EC_KEY; -- -- pub fn PKCS5_PBKDF2_HMAC_SHA1( -- pass: *const c_char, -- passlen: c_int, -- salt: *const u8, -- saltlen: c_int, -- iter: c_int, -- keylen: c_int, -- out: *mut u8, -- ) -> c_int; -- pub fn PKCS5_PBKDF2_HMAC( -- pass: *const c_char, -- passlen: c_int, -- salt: *const c_uchar, -- saltlen: c_int, -- iter: c_int, -- digest: *const EVP_MD, -- keylen: c_int, -- out: *mut u8, -- ) -> c_int; -- -- pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int; -- pub fn RAND_status() -> c_int; -- -- pub fn RSA_new() -> *mut RSA; -- pub fn RSA_free(rsa: *mut RSA); -- pub fn RSA_up_ref(rsa: *mut RSA) -> c_int; -- pub fn RSA_generate_key_ex( -- rsa: *mut RSA, -- bits: c_int, -- e: *mut BIGNUM, -- cb: *mut BN_GENCB, -- ) -> c_int; -- pub fn RSA_private_decrypt( -- flen: c_int, -- from: *const u8, -- to: *mut u8, -- k: *mut RSA, -- pad: c_int, -- ) -> c_int; -- pub fn RSA_public_decrypt( -- flen: c_int, -- from: *const u8, -- to: *mut u8, -- k: *mut RSA, -- pad: c_int, -- ) -> c_int; -- pub fn RSA_private_encrypt( -- flen: c_int, -- from: *const u8, -- to: *mut u8, -- k: *mut RSA, -- pad: c_int, -- ) -> c_int; -- pub fn RSA_public_encrypt( -- flen: c_int, -- from: *const u8, -- to: *mut u8, -- k: *mut RSA, -- pad: c_int, -- ) -> c_int; -- pub fn RSA_sign( -- t: c_int, -- m: *const u8, -- mlen: c_uint, -- sig: *mut u8, -- siglen: *mut c_uint, -- k: *mut RSA, -- ) -> c_int; -- pub fn RSA_size(k: *const RSA) -> c_int; -- pub fn RSA_verify( -- t: c_int, -- m: *const u8, -- mlen: c_uint, -- sig: *const u8, -- siglen: c_uint, -- k: *mut RSA, -- ) -> c_int; -- -- pub fn RSA_padding_check_PKCS1_type_2( -- to: *mut c_uchar, -- tlen: c_int, -- f: *const c_uchar, -- fl: c_int, -- rsa_len: c_int, -- ) -> c_int; -- -- pub fn DSA_new() -> *mut DSA; -- pub fn DSA_free(dsa: *mut DSA); -- pub fn DSA_size(dsa: *const DSA) -> c_int; -- pub fn DSA_generate_parameters_ex( -- dsa: *mut DSA, -- bits: c_int, -- seed: *const c_uchar, -- seed_len: c_int, -- counter_ref: *mut c_int, -- h_ret: *mut c_ulong, -- cb: *mut BN_GENCB, -- ) -> c_int; -- pub fn DSA_generate_key(dsa: *mut DSA) -> c_int; -- pub fn DSA_sign( -- dummy: c_int, -- dgst: *const c_uchar, -- len: c_int, -- sigret: *mut c_uchar, -- siglen: *mut c_uint, -- dsa: *mut DSA, -- ) -> c_int; -- pub fn DSA_verify( -- dummy: c_int, -- dgst: *const c_uchar, -- len: c_int, -- sigbuf: *const c_uchar, -- siglen: c_int, -- dsa: *mut DSA, -- ) -> c_int; -- -- pub fn SHA1(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -- pub fn SHA224(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -- pub fn SHA256(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -- pub fn SHA384(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -- pub fn SHA512(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -- -- pub fn SHA1_Init(c: *mut SHA_CTX) -> c_int; -- pub fn SHA1_Update(c: *mut SHA_CTX, data: *const c_void, len: size_t) -> c_int; -- pub fn SHA1_Final(md: *mut c_uchar, c: *mut SHA_CTX) -> c_int; -- pub fn SHA256_Init(c: *mut SHA256_CTX) -> c_int; -- pub fn SHA256_Update(c: *mut SHA256_CTX, data: *const c_void, len: size_t) -> c_int; -- pub fn SHA256_Final(md: *mut c_uchar, c: *mut SHA256_CTX) -> c_int; -- pub fn SHA224_Init(c: *mut SHA256_CTX) -> c_int; -- pub fn SHA224_Update(c: *mut SHA256_CTX, data: *const c_void, len: size_t) -> c_int; -- pub fn SHA224_Final(md: *mut c_uchar, c: *mut SHA256_CTX) -> c_int; -- pub fn SHA384_Init(c: *mut SHA512_CTX) -> c_int; -- pub fn SHA384_Update(c: *mut SHA512_CTX, data: *const c_void, len: size_t) -> c_int; -- pub fn SHA384_Final(md: *mut c_uchar, c: *mut SHA512_CTX) -> c_int; -- pub fn SHA512_Init(c: *mut SHA512_CTX) -> c_int; -- pub fn SHA512_Update(c: *mut SHA512_CTX, data: *const c_void, len: size_t) -> c_int; -- pub fn SHA512_Final(md: *mut c_uchar, c: *mut SHA512_CTX) -> c_int; -- -- pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; -- pub fn SSL_pending(ssl: *const SSL) -> c_int; -- pub fn SSL_free(ssl: *mut SSL); -- pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); -- pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; -- pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; -- pub fn SSL_accept(ssl: *mut SSL) -> c_int; -- pub fn SSL_connect(ssl: *mut SSL) -> c_int; -- pub fn SSL_do_handshake(ssl: *mut SSL) -> c_int; -- pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -- pub fn SSL_get_error(ssl: *const SSL, ret: c_int) -> c_int; -- pub fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int; -- pub fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int; -- pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> c_int; -- pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; -- pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; -- #[cfg(not(any(osslconf = "OPENSSL_NO_COMP", libressl)))] -- pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; -- #[cfg(libressl)] -- pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const libc::c_void; -- pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; -- pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; -- pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD; -- pub fn SSL_get_version(ssl: *const SSL) -> *const c_char; -- pub fn SSL_version(ssl: *const SSL) -> c_int; -- pub fn SSL_state_string(ssl: *const SSL) -> *const c_char; -- pub fn SSL_state_string_long(ssl: *const SSL) -> *const c_char; -- pub fn SSL_set_verify( -- ssl: *mut SSL, -- mode: c_int, -- verify_callback: Option c_int>, -- ); -- pub fn SSL_set_ex_data(ssl: *mut SSL, idx: c_int, data: *mut c_void) -> c_int; -- pub fn SSL_get_ex_data(ssl: *const SSL, idx: c_int) -> *mut c_void; -- pub fn SSL_get_servername(ssl: *const SSL, name_type: c_int) -> *const c_char; -- pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; -- #[cfg(any(ossl102, libressl261))] -- pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; -- pub fn SSL_get_verify_result(ssl: *const SSL) -> c_long; -- pub fn SSL_shutdown(ssl: *mut SSL) -> c_int; -- pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; -- #[cfg(not(ossl102))] -- pub fn SSL_get_privatekey(ssl: *mut SSL) -> *mut EVP_PKEY; -- #[cfg(ossl102)] -- pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; -- pub fn SSL_load_client_CA_file(file: *const c_char) -> *mut stack_st_X509_NAME; -- pub fn SSL_set_tmp_dh_callback( -- ctx: *mut SSL, -- dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH, -- ); -- pub fn SSL_export_keying_material( -- s: *mut SSL, -- out: *mut c_uchar, -- olen: size_t, -- label: *const c_char, -- llen: size_t, -- context: *const c_uchar, -- contextlen: size_t, -- use_context: c_int, -- ) -> c_int; -- -- #[cfg(not(any(osslconf = "OPENSSL_NO_COMP", libressl)))] -- pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const c_char; -- #[cfg(libressl)] -- pub fn SSL_COMP_get_name(comp: *const libc::c_void) -> *const c_char; -- -- pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const c_char; -- pub fn SSL_CIPHER_get_bits(cipher: *const SSL_CIPHER, alg_bits: *mut c_int) -> c_int; -- pub fn SSL_CIPHER_description( -- cipher: *const SSL_CIPHER, -- buf: *mut c_char, -- size: c_int, -- ) -> *mut c_char; -- -- pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; -- pub fn SSL_CTX_free(ctx: *mut SSL_CTX); -- pub fn SSL_CTX_ctrl(ctx: *mut SSL_CTX, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -- pub fn SSL_CTX_callback_ctrl( -- ctx: *mut SSL_CTX, -- cmd: c_int, -- fp: Option, -- ) -> c_long; -- pub fn SSL_CTX_set_verify( -- ctx: *mut SSL_CTX, -- mode: c_int, -- verify_callback: Option c_int>, -- ); -- pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int); -- pub fn SSL_CTX_load_verify_locations( -- ctx: *mut SSL_CTX, -- CAfile: *const c_char, -- CApath: *const c_char, -- ) -> c_int; -- pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> c_int; -- pub fn SSL_CTX_set_ex_data(ctx: *mut SSL_CTX, idx: c_int, data: *mut c_void) -> c_int; -- pub fn SSL_CTX_get_ex_data(ctx: *const SSL_CTX, idx: c_int) -> *mut c_void; -- pub fn SSL_CTX_set_session_id_context( -- ssl: *mut SSL_CTX, -- sid_ctx: *const c_uchar, -- sid_ctx_len: c_uint, -- ) -> c_int; -- -- pub fn SSL_CTX_use_certificate_file( -- ctx: *mut SSL_CTX, -- cert_file: *const c_char, -- file_type: c_int, -- ) -> c_int; -- pub fn SSL_CTX_use_certificate_chain_file( -- ctx: *mut SSL_CTX, -- cert_chain_file: *const c_char, -- ) -> c_int; -- pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, cert: *mut X509) -> c_int; -- -- pub fn SSL_CTX_use_PrivateKey_file( -- ctx: *mut SSL_CTX, -- key_file: *const c_char, -- file_type: c_int, -- ) -> c_int; -- pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, key: *mut EVP_PKEY) -> c_int; -- pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> c_int; -- pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, list: *mut stack_st_X509_NAME); -- pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; -- // FIXME should take an option -- pub fn SSL_CTX_set_tmp_dh_callback( -- ctx: *mut SSL_CTX, -- dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH, -- ); -- pub fn SSL_CTX_sess_set_new_cb( -- ctx: *mut SSL_CTX, -- new_session_cb: Option c_int>, -- ); -- pub fn SSL_CTX_sess_set_remove_cb( -- ctx: *mut SSL_CTX, -- remove_session_cb: Option, -- ); -- -- #[cfg(ossl102)] -- pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; -- #[cfg(ossl102)] -- pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; -- -- pub fn SSL_CTX_set_cipher_list(ssl: *mut SSL_CTX, s: *const c_char) -> c_int; -- -- pub fn SSL_CTX_set_next_protos_advertised_cb( -- ssl: *mut SSL_CTX, -- cb: extern "C" fn( -- ssl: *mut SSL, -- out: *mut *const c_uchar, -- outlen: *mut c_uint, -- arg: *mut c_void, -- ) -> c_int, -- arg: *mut c_void, -- ); -- pub fn SSL_CTX_set_next_proto_select_cb( -- ssl: *mut SSL_CTX, -- cb: extern "C" fn( -- ssl: *mut SSL, -- out: *mut *mut c_uchar, -- outlen: *mut c_uchar, -- inbuf: *const c_uchar, -- inlen: c_uint, -- arg: *mut c_void, -- ) -> c_int, -- arg: *mut c_void, -- ); -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- pub fn SSL_CTX_set_psk_client_callback( -- ssl: *mut SSL_CTX, -- psk_client_cb: Option< -- extern "C" fn(*mut SSL, *const c_char, *mut c_char, c_uint, *mut c_uchar, c_uint) -- -> c_uint, -- >, -- ); -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- pub fn SSL_CTX_set_psk_server_callback( -- ssl: *mut SSL_CTX, -- psk_server_cb: Option< -- extern "C" fn(*mut SSL, *const c_char, *mut c_uchar, c_uint) -> c_uint, -- >, -- ); -- -- pub fn SSL_select_next_proto( -- out: *mut *mut c_uchar, -- outlen: *mut c_uchar, -- inbuf: *const c_uchar, -- inlen: c_uint, -- client: *const c_uchar, -- client_len: c_uint, -- ) -> c_int; -- pub fn SSL_get0_next_proto_negotiated( -- s: *const SSL, -- data: *mut *const c_uchar, -- len: *mut c_uint, -- ); -- pub fn SSL_get_session(s: *const SSL) -> *mut SSL_SESSION; -- pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> c_int; -- #[cfg(all(ossl102, not(ossl110f)))] -- pub fn SSL_is_server(s: *mut SSL) -> c_int; -- #[cfg(any(ossl110f, libressl273))] -- pub fn SSL_is_server(s: *const SSL) -> c_int; -- pub fn SSL_get_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; -- pub fn SSL_get_peer_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; -- -- pub fn SSL_SESSION_free(s: *mut SSL_SESSION); -- pub fn SSL_SESSION_get_id(s: *const SSL_SESSION, len: *mut c_uint) -> *const c_uchar; -- -- pub fn d2i_SSL_SESSION( -- a: *mut *mut SSL_SESSION, -- pp: *mut *const c_uchar, -- len: c_long, -- ) -> *mut SSL_SESSION; -- pub fn i2d_SSL_SESSION(s: *mut SSL_SESSION, pp: *mut *mut c_uchar) -> c_int; -- -- #[cfg(any(ossl102, libressl261))] -- pub fn SSL_CTX_set_alpn_protos(s: *mut SSL_CTX, data: *const c_uchar, len: c_uint) -> c_int; -- -- #[cfg(any(ossl102, libressl261))] -- pub fn SSL_set_alpn_protos(s: *mut SSL, data: *const c_uchar, len: c_uint) -> c_int; -- -- // FIXME should take an Option -- #[cfg(any(ossl102, libressl261))] -- pub fn SSL_CTX_set_alpn_select_cb( -- ssl: *mut SSL_CTX, -- cb: extern "C" fn( -- ssl: *mut SSL, -- out: *mut *const c_uchar, -- outlen: *mut c_uchar, -- inbuf: *const c_uchar, -- inlen: c_uint, -- arg: *mut c_void, -- ) -> c_int, -- arg: *mut c_void, -- ); -- #[cfg(any(ossl102, libressl261))] -- pub fn SSL_get0_alpn_selected(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); -- -- pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int; -- pub fn X509_digest( -- x: *const X509, -- digest: *const EVP_MD, -- buf: *mut c_uchar, -- len: *mut c_uint, -- ) -> c_int; -- pub fn X509_free(x: *mut X509); -- pub fn X509_REQ_free(x: *mut X509_REQ); -- pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER; -- pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME; -- pub fn X509_new() -> *mut X509; -- pub fn X509_set_issuer_name(x: *mut X509, name: *mut X509_NAME) -> c_int; -- pub fn X509_set_subject_name(x: *mut X509, name: *mut X509_NAME) -> c_int; -- pub fn X509_set_serialNumber(x: *mut X509, sn: *mut ASN1_INTEGER) -> c_int; -- pub fn X509_set_version(x: *mut X509, version: c_long) -> c_int; -- pub fn X509_set_pubkey(x: *mut X509, pkey: *mut EVP_PKEY) -> c_int; -- pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; -- pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY; -- pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ; -- pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> c_int; -- pub fn X509_verify_cert_error_string(n: c_long) -> *const c_char; -- pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING; -- pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int; -- -- pub fn X509_ALGOR_free(x: *mut X509_ALGOR); -- -- pub fn X509_EXTENSION_free(ext: *mut X509_EXTENSION); -- -- pub fn X509_NAME_new() -> *mut X509_NAME; -- pub fn X509_NAME_free(x: *mut X509_NAME); -- pub fn X509_NAME_add_entry_by_txt( -- x: *mut X509_NAME, -- field: *const c_char, -- ty: c_int, -- bytes: *const c_uchar, -- len: c_int, -- loc: c_int, -- set: c_int, -- ) -> c_int; -- pub fn X509_NAME_get_index_by_NID(n: *mut X509_NAME, nid: c_int, last_pos: c_int) -> c_int; -- -- pub fn X509_NAME_ENTRY_free(x: *mut X509_NAME_ENTRY); -- -- pub fn ASN1_STRING_free(x: *mut ASN1_STRING); -- pub fn ASN1_STRING_length(x: *const ASN1_STRING) -> c_int; -- -- pub fn ASN1_INTEGER_free(x: *mut ASN1_INTEGER); -- -- pub fn X509_STORE_new() -> *mut X509_STORE; -- pub fn X509_STORE_free(store: *mut X509_STORE); -- pub fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int; -- pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int; -- -- pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; -- pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); -- pub fn X509_STORE_CTX_init( -- ctx: *mut X509_STORE_CTX, -- store: *mut X509_STORE, -- x509: *mut X509, -- chain: *mut stack_st_X509, -- ) -> c_int; -- pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); -- pub fn X509_STORE_CTX_get_current_cert(ctx: *mut X509_STORE_CTX) -> *mut X509; -- pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int; -- pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, error: c_int); -- pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void; -- pub fn X509_STORE_CTX_get_error_depth(ctx: *mut X509_STORE_CTX) -> c_int; -- -- pub fn X509V3_set_ctx( -- ctx: *mut X509V3_CTX, -- issuer: *mut X509, -- subject: *mut X509, -- req: *mut X509_REQ, -- crl: *mut X509_CRL, -- flags: c_int, -- ); -- pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF); -- -- pub fn X509_REQ_new() -> *mut X509_REQ; -- pub fn X509_REQ_set_version(req: *mut X509_REQ, version: c_long) -> c_int; -- pub fn X509_REQ_set_subject_name(req: *mut X509_REQ, name: *mut X509_NAME) -> c_int; -- pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> c_int; -- pub fn X509_REQ_get_pubkey(req: *mut X509_REQ) -> *mut EVP_PKEY; -- pub fn X509_REQ_add_extensions(req: *mut X509_REQ, exts: *mut stack_st_X509_EXTENSION) -- -> c_int; -- pub fn X509_REQ_get_extensions(req: *mut X509_REQ) -> *mut stack_st_X509_EXTENSION; -- pub fn X509_REQ_sign(x: *mut X509_REQ, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; -- -- #[cfg(any(ossl102, libressl261))] -- pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); -- #[cfg(any(ossl102, libressl261))] -- pub fn X509_VERIFY_PARAM_set_hostflags(param: *mut X509_VERIFY_PARAM, flags: c_uint); -- #[cfg(any(ossl102, libressl261))] -- pub fn X509_VERIFY_PARAM_set1_host( -- param: *mut X509_VERIFY_PARAM, -- name: *const c_char, -- namelen: size_t, -- ) -> c_int; -- #[cfg(any(ossl102, libressl261))] -- pub fn X509_VERIFY_PARAM_set1_ip( -- param: *mut X509_VERIFY_PARAM, -- ip: *const c_uchar, -- iplen: size_t, -- ) -> c_int; -- -- pub fn d2i_DHparams(k: *mut *mut DH, pp: *mut *const c_uchar, length: c_long) -> *mut DH; -- pub fn i2d_DHparams(dh: *const DH, pp: *mut *mut c_uchar) -> c_int; -- -- pub fn d2i_DSAPublicKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -> *mut DSA; -- pub fn i2d_DSAPublicKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int; -- pub fn d2i_DSAPrivateKey(a: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -- -> *mut DSA; -- pub fn i2d_DSAPrivateKey(a: *const DSA, pp: *mut *mut c_uchar) -> c_int; -- pub fn d2i_DSA_PUBKEY(k: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -> *mut DSA; -- pub fn i2d_DSA_PUBKEY(a: *mut DSA, pp: *mut *mut c_uchar) -> c_int; -- -- pub fn d2i_ECPrivateKey( -- k: *mut *mut EC_KEY, -- pp: *mut *const c_uchar, -- length: c_long, -- ) -> *mut EC_KEY; -- pub fn i2d_ECPrivateKey(ec_key: *mut EC_KEY, pp: *mut *mut c_uchar) -> c_int; -- -- pub fn d2i_X509(a: *mut *mut X509, pp: *mut *const c_uchar, length: c_long) -> *mut X509; -- pub fn d2i_X509_REQ( -- a: *mut *mut X509_REQ, -- pp: *mut *const c_uchar, -- length: c_long, -- ) -> *mut X509_REQ; -- pub fn i2d_X509_bio(b: *mut BIO, x: *mut X509) -> c_int; -- pub fn i2d_X509(x: *mut X509, buf: *mut *mut u8) -> c_int; -- pub fn i2d_X509_REQ_bio(b: *mut BIO, x: *mut X509_REQ) -> c_int; -- pub fn i2d_X509_REQ(x: *mut X509_REQ, buf: *mut *mut u8) -> c_int; -- -- pub fn d2i_AutoPrivateKey( -- a: *mut *mut EVP_PKEY, -- pp: *mut *const c_uchar, -- length: c_long, -- ) -> *mut EVP_PKEY; -- pub fn d2i_PUBKEY(k: *mut *mut EVP_PKEY, buf: *mut *const u8, len: c_long) -> *mut EVP_PKEY; -- pub fn i2d_PUBKEY_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; -- pub fn i2d_PrivateKey_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; -- pub fn i2d_PUBKEY(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int; -- pub fn i2d_PrivateKey(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int; -- -- pub fn i2d_RSA_PUBKEY(k: *mut RSA, buf: *mut *mut u8) -> c_int; -- pub fn d2i_RSA_PUBKEY(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -- pub fn i2d_RSAPublicKey(k: *const RSA, buf: *mut *mut u8) -> c_int; -- pub fn d2i_RSAPublicKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -- pub fn i2d_RSAPrivateKey(k: *const RSA, buf: *mut *mut u8) -> c_int; -- pub fn d2i_RSAPrivateKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -- -- pub fn i2d_PKCS12_bio(b: *mut BIO, a: *mut PKCS12) -> c_int; -- pub fn i2d_PKCS12(a: *mut PKCS12, buf: *mut *mut u8) -> c_int; -- pub fn d2i_PKCS12(a: *mut *mut PKCS12, pp: *mut *const u8, length: c_long) -> *mut PKCS12; -- pub fn PKCS12_parse( -- p12: *mut PKCS12, -- pass: *const c_char, -- pkey: *mut *mut EVP_PKEY, -- cert: *mut *mut X509, -- ca: *mut *mut stack_st_X509, -- ) -> c_int; -- pub fn PKCS12_free(p12: *mut PKCS12); -- -- pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME); -- -- pub fn HMAC_Init_ex( -- ctx: *mut HMAC_CTX, -- key: *const c_void, -- len: c_int, -- md: *const EVP_MD, -- impl_: *mut ENGINE, -- ) -> c_int; -- pub fn HMAC_Update(ctx: *mut HMAC_CTX, data: *const c_uchar, len: size_t) -> c_int; -- pub fn HMAC_Final(ctx: *mut HMAC_CTX, md: *mut c_uchar, len: *mut c_uint) -> c_int; -- -- // FIXME change to unsafe extern "C" fn -- pub fn SSL_CTX_set_cookie_generate_cb( -- s: *mut SSL_CTX, -- cb: Option< -- extern "C" fn(ssl: *mut SSL, cookie: *mut c_uchar, cookie_len: *mut c_uint) -> c_int, -- >, -- ); -- -- // FIXME change to unsafe extern "C" fn -- #[cfg(ossl110)] -- pub fn SSL_CTX_set_cookie_verify_cb( -- s: *mut SSL_CTX, -- cb: Option< -- extern "C" fn(ssl: *mut SSL, cookie: *const c_uchar, cookie_len: c_uint) -> c_int, -- >, -- ); -- -- #[cfg(not(ossl110))] -- pub fn SSL_CTX_set_cookie_verify_cb( -- s: *mut SSL_CTX, -- cb: Option c_int>, -- ); -- -- pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; -- pub fn EVP_get_digestbyname(name: *const c_char) -> *const EVP_MD; -- pub fn EVP_get_cipherbyname(name: *const c_char) -> *const EVP_CIPHER; -- -- pub fn SSL_set_connect_state(s: *mut SSL); -- pub fn SSL_set_accept_state(s: *mut SSL); -+ CRYPTO_set_locking_callback(locking_function); -+ set_id_callback(); -+ }) - } Index: lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_mod.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_mod.rs +++ /dev/null @@ -1,639 +0,0 @@ ---- src/vendor/openssl-sys/src/libressl/mod.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/libressl/mod.rs -@@ -1,636 +0,0 @@ --use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; --use std::mem; --use std::ptr; --use std::sync::{Mutex, MutexGuard}; --use std::sync::{Once, ONCE_INIT}; -- --#[cfg(not(libressl251))] --pub use libressl::v250::*; --#[cfg(libressl251)] --pub use libressl::v251::*; --#[cfg(libressl273)] --pub use libressl::v273::*; -- --#[cfg(not(libressl251))] --mod v250; --#[cfg(libressl251)] --mod v251; --#[cfg(libressl273)] --mod v273; -- --#[repr(C)] --pub struct stack_st_ASN1_OBJECT { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509 { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_NAME { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_ATTRIBUTE { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_EXTENSION { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_GENERAL_NAME { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_void { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_SSL_CIPHER { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_OPENSSL_STRING { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct _STACK { -- pub num: c_int, -- pub data: *mut *mut c_char, -- pub sorted: c_int, -- pub num_alloc: c_int, -- pub comp: Option c_int>, --} -- --#[repr(C)] --pub struct BIO_METHOD { -- pub type_: c_int, -- pub name: *const c_char, -- pub bwrite: Option c_int>, -- pub bread: Option c_int>, -- pub bputs: Option c_int>, -- pub bgets: Option c_int>, -- pub ctrl: Option c_long>, -- pub create: Option c_int>, -- pub destroy: Option c_int>, -- pub callback_ctrl: Option c_long>, --} -- --#[repr(C)] --pub struct RSA { -- pub pad: c_int, -- pub version: c_long, -- pub meth: *const ::RSA_METHOD, -- -- pub engine: *mut ::ENGINE, -- pub n: *mut ::BIGNUM, -- pub e: *mut ::BIGNUM, -- pub d: *mut ::BIGNUM, -- pub p: *mut ::BIGNUM, -- pub q: *mut ::BIGNUM, -- pub dmp1: *mut ::BIGNUM, -- pub dmq1: *mut ::BIGNUM, -- pub iqmp: *mut ::BIGNUM, -- -- pub ex_data: ::CRYPTO_EX_DATA, -- pub references: c_int, -- pub flags: c_int, -- -- pub _method_mod_n: *mut ::BN_MONT_CTX, -- pub _method_mod_p: *mut ::BN_MONT_CTX, -- pub _method_mod_q: *mut ::BN_MONT_CTX, -- -- pub blinding: *mut ::BN_BLINDING, -- pub mt_blinding: *mut ::BN_BLINDING, --} -- --#[repr(C)] --pub struct DSA { -- pub pad: c_int, -- pub version: c_long, -- pub write_params: c_int, -- -- pub p: *mut ::BIGNUM, -- pub q: *mut ::BIGNUM, -- pub g: *mut ::BIGNUM, -- pub pub_key: *mut ::BIGNUM, -- pub priv_key: *mut ::BIGNUM, -- pub kinv: *mut ::BIGNUM, -- pub r: *mut ::BIGNUM, -- -- pub flags: c_int, -- pub method_mont_p: *mut ::BN_MONT_CTX, -- pub references: c_int, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub meth: *const ::DSA_METHOD, -- pub engine: *mut ::ENGINE, --} -- --#[repr(C)] --pub struct ECDSA_SIG { -- pub r: *mut ::BIGNUM, -- pub s: *mut ::BIGNUM, --} -- --#[repr(C)] --pub struct EVP_PKEY { -- pub type_: c_int, -- pub save_type: c_int, -- pub references: c_int, -- pub ameth: *const ::EVP_PKEY_ASN1_METHOD, -- pub engine: *mut ::ENGINE, -- pub pkey: *mut c_void, -- pub save_parameters: c_int, -- pub attributes: *mut stack_st_X509_ATTRIBUTE, --} -- --#[repr(C)] --pub struct BIO { -- pub method: *mut ::BIO_METHOD, -- pub callback: Option< -- unsafe extern "C" fn(*mut ::BIO, c_int, *const c_char, c_int, c_long, c_long) -> c_long, -- >, -- pub cb_arg: *mut c_char, -- pub init: c_int, -- pub shutdown: c_int, -- pub flags: c_int, -- pub retry_reason: c_int, -- pub num: c_int, -- pub ptr: *mut c_void, -- pub next_bio: *mut ::BIO, -- pub prev_bio: *mut ::BIO, -- pub references: c_int, -- pub num_read: c_ulong, -- pub num_write: c_ulong, -- pub ex_data: ::CRYPTO_EX_DATA, --} -- --#[repr(C)] --pub struct CRYPTO_EX_DATA { -- pub sk: *mut ::stack_st_void, --} -- --#[repr(C)] --pub struct EVP_MD_CTX { -- digest: *mut ::EVP_MD, -- engine: *mut ::ENGINE, -- flags: c_ulong, -- md_data: *mut c_void, -- pctx: *mut ::EVP_PKEY_CTX, -- update: *mut c_void, --} -- --#[repr(C)] --pub struct EVP_CIPHER { -- pub nid: c_int, -- pub block_size: c_int, -- pub key_len: c_int, -- pub iv_len: c_int, -- pub flags: c_ulong, -- pub init: Option< -- unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *const c_uchar, *const c_uchar, c_int) -> c_int, -- >, -- pub do_cipher: Option< -- unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut c_uchar, *const c_uchar, size_t) -> c_int, -- >, -- pub cleanup: Option c_int>, -- pub ctx_size: c_int, -- pub set_asn1_parameters: -- Option c_int>, -- pub get_asn1_parameters: -- Option c_int>, -- pub ctrl: -- Option c_int>, -- pub app_data: *mut c_void, --} -- --#[repr(C)] --pub struct HMAC_CTX { -- md: *mut ::EVP_MD, -- md_ctx: ::EVP_MD_CTX, -- i_ctx: ::EVP_MD_CTX, -- o_ctx: ::EVP_MD_CTX, -- key_length: c_uint, -- key: [c_uchar; 128], --} -- --#[repr(C)] --pub struct BIGNUM { -- pub d: *mut ::BN_ULONG, -- pub top: c_int, -- pub dmax: c_int, -- pub neg: c_int, -- pub flags: c_int, --} -- --#[repr(C)] --pub struct DH { -- pub pad: c_int, -- pub version: c_int, -- pub p: *mut ::BIGNUM, -- pub g: *mut ::BIGNUM, -- pub length: c_long, -- pub pub_key: *mut ::BIGNUM, -- pub priv_key: *mut ::BIGNUM, -- pub flags: c_int, -- pub method_mont_p: *mut ::BN_MONT_CTX, -- pub q: *mut ::BIGNUM, -- pub j: *mut ::BIGNUM, -- pub seed: *mut c_uchar, -- pub seedlen: c_int, -- pub counter: *mut ::BIGNUM, -- pub references: c_int, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub meth: *const ::DH_METHOD, -- pub engine: *mut ::ENGINE, --} -- --#[repr(C)] --pub struct X509 { -- pub cert_info: *mut X509_CINF, -- pub sig_alg: *mut ::X509_ALGOR, -- pub signature: *mut ::ASN1_BIT_STRING, -- pub valid: c_int, -- pub references: c_int, -- pub name: *mut c_char, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub ex_pathlen: c_long, -- pub ex_pcpathlen: c_long, -- pub ex_flags: c_ulong, -- pub ex_kusage: c_ulong, -- pub ex_xkusage: c_ulong, -- pub ex_nscert: c_ulong, -- skid: *mut c_void, -- akid: *mut c_void, -- policy_cache: *mut c_void, -- crldp: *mut c_void, -- altname: *mut c_void, -- nc: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_SHA"))] -- sha1_hash: [c_uchar; 20], -- aux: *mut c_void, --} -- --#[repr(C)] --pub struct X509_CINF { -- version: *mut c_void, -- serialNumber: *mut c_void, -- signature: *mut c_void, -- issuer: *mut c_void, -- pub validity: *mut X509_VAL, -- subject: *mut c_void, -- key: *mut c_void, -- issuerUID: *mut c_void, -- subjectUID: *mut c_void, -- pub extensions: *mut stack_st_X509_EXTENSION, -- enc: ASN1_ENCODING, --} -- --#[repr(C)] --pub struct X509_ALGOR { -- pub algorithm: *mut ::ASN1_OBJECT, -- parameter: *mut c_void, --} -- --#[repr(C)] --pub struct ASN1_ENCODING { -- pub enc: *mut c_uchar, -- pub len: c_long, -- pub modified: c_int, --} -- --#[repr(C)] --pub struct X509_VAL { -- pub notBefore: *mut ::ASN1_TIME, -- pub notAfter: *mut ::ASN1_TIME, --} -- --#[repr(C)] --pub struct X509_REQ_INFO { -- pub enc: ASN1_ENCODING, -- pub version: *mut ::ASN1_INTEGER, -- pub subject: *mut ::X509_NAME, -- pubkey: *mut c_void, -- pub attributes: *mut stack_st_X509_ATTRIBUTE, --} -- --#[repr(C)] --pub struct X509_REQ { -- pub req_info: *mut X509_REQ_INFO, -- sig_alg: *mut c_void, -- signature: *mut c_void, -- references: c_int, --} -- --pub enum X509_VERIFY_PARAM_ID {} --pub enum PKCS12 {} -- --pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8; --pub const SSL_CTRL_OPTIONS: c_int = 32; --pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; --pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94; -- --#[cfg(libressl261)] --pub const SSL_OP_ALL: c_ulong = 0x4; --#[cfg(not(libressl261))] --pub const SSL_OP_ALL: c_ulong = 0x80000014; --pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0; --pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0; --pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x0; --pub const SSL_OP_NO_SSLv3: c_ulong = 0x0; --pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x0; --pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x0; --pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x0; --pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x0; --pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0; --pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0; --pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0; --#[cfg(libressl261)] --pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x0; --#[cfg(not(libressl261))] --pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000; --pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000; --pub const SSL_OP_NO_SSLv2: c_ulong = 0x0; -- --pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32; --pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32; --pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48; -- --pub const SSLEAY_VERSION: c_int = 0; --pub const SSLEAY_CFLAGS: c_int = 2; --pub const SSLEAY_BUILT_ON: c_int = 3; --pub const SSLEAY_PLATFORM: c_int = 4; --pub const SSLEAY_DIR: c_int = 5; -- --pub const CRYPTO_LOCK_X509: c_int = 3; --pub const CRYPTO_LOCK_SSL_CTX: c_int = 12; --pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14; -- --static mut MUTEXES: *mut Vec> = 0 as *mut Vec>; --static mut GUARDS: *mut Vec>> = -- 0 as *mut Vec>>; -- --unsafe extern "C" fn locking_function(mode: c_int, n: c_int, _file: *const c_char, _line: c_int) { -- let mutex = &(*MUTEXES)[n as usize]; -- -- if mode & ::CRYPTO_LOCK != 0 { -- (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); -- } else { -- &(*GUARDS)[n as usize].take().expect("lock already unlocked"); -- } --} -- --pub fn init() { -- static INIT: Once = ONCE_INIT; -- -- INIT.call_once(|| unsafe { -- SSL_library_init(); -- SSL_load_error_strings(); -- OPENSSL_add_all_algorithms_noconf(); -- -- let num_locks = ::CRYPTO_num_locks(); -- let mut mutexes = Box::new(Vec::new()); -- for _ in 0..num_locks { -- mutexes.push(Mutex::new(())); -- } -- MUTEXES = mem::transmute(mutexes); -- let guards: Box>>> = -- Box::new((0..num_locks).map(|_| None).collect()); -- GUARDS = mem::transmute(guards); -- -- CRYPTO_set_locking_callback(locking_function); -- set_id_callback(); -- }) --} -- --#[cfg(unix)] --fn set_id_callback() { -- unsafe extern "C" fn thread_id() -> c_ulong { -- ::libc::pthread_self() as c_ulong -- } -- -- unsafe { -- CRYPTO_set_id_callback(thread_id); -- } --} -- --#[cfg(not(unix))] --fn set_id_callback() {} -- --// macros -- --pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int { -- ::SSL_CTX_ctrl( -- ctx, -- SSL_CTRL_SET_ECDH_AUTO, -- onoff as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int { -- ::SSL_ctrl( -- ssl, -- SSL_CTRL_SET_ECDH_AUTO, -- onoff as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int { -- ::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int --} -- --pub unsafe fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong { -- ::SSL_CTX_ctrl(ctx as *mut _, ::SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong --} -- --pub unsafe fn SSL_CTX_set_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong { -- ::SSL_CTX_ctrl( -- ctx as *mut _, -- ::SSL_CTRL_OPTIONS, -- op as c_long, -- ptr::null_mut(), -- ) as c_ulong --} -- --pub unsafe fn SSL_CTX_clear_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong { -- ::SSL_CTX_ctrl( -- ctx as *mut _, -- ::SSL_CTRL_CLEAR_OPTIONS, -- op as c_long, -- ptr::null_mut(), -- ) as c_ulong --} -- --extern "C" { -- pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO; -- pub fn BIO_s_file() -> *mut BIO_METHOD; -- pub fn BIO_s_mem() -> *mut BIO_METHOD; -- -- pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM; -- -- pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void; -- pub fn CRYPTO_free(buf: *mut c_void); -- pub fn CRYPTO_num_locks() -> c_int; -- pub fn CRYPTO_set_locking_callback( -- func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int), -- ); -- pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong); -- -- pub fn ERR_load_crypto_strings(); -- -- pub fn RSA_generate_key( -- modsz: c_int, -- e: c_ulong, -- cb: Option, -- cbarg: *mut c_void, -- ) -> *mut RSA; -- -- pub fn OCSP_cert_to_id( -- dgst: *const ::EVP_MD, -- subject: *mut ::X509, -- issuer: *mut ::X509, -- ) -> *mut ::OCSP_CERTID; -- -- pub fn PKCS12_create( -- pass: *mut c_char, -- friendly_name: *mut c_char, -- pkey: *mut EVP_PKEY, -- cert: *mut X509, -- ca: *mut stack_st_X509, -- nid_key: c_int, -- nid_cert: c_int, -- iter: c_int, -- mac_iter: c_int, -- keytype: c_int, -- ) -> *mut PKCS12; -- -- pub fn SSL_library_init() -> c_int; -- pub fn SSL_load_error_strings(); -- pub fn OPENSSL_add_all_algorithms_noconf(); -- pub fn HMAC_CTX_init(ctx: *mut ::HMAC_CTX); -- pub fn HMAC_CTX_cleanup(ctx: *mut ::HMAC_CTX); -- pub fn TLSv1_method() -> *const ::SSL_METHOD; -- pub fn SSLv23_method() -> *const ::SSL_METHOD; -- pub fn TLSv1_1_method() -> *const ::SSL_METHOD; -- pub fn TLSv1_2_method() -> *const ::SSL_METHOD; -- pub fn DTLSv1_method() -> *const ::SSL_METHOD; -- pub fn SSL_get_ex_new_index( -- argl: c_long, -- argp: *mut c_void, -- new_func: Option<::CRYPTO_EX_new>, -- dup_func: Option<::CRYPTO_EX_dup>, -- free_func: Option<::CRYPTO_EX_free>, -- ) -> c_int; -- pub fn SSL_set_tmp_ecdh_callback( -- ssl: *mut ::SSL, -- ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int) -- -> *mut ::EC_KEY, -- ); -- pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *mut c_char; -- pub fn SSL_CTX_get_ex_new_index( -- argl: c_long, -- argp: *mut c_void, -- new_func: Option<::CRYPTO_EX_new>, -- dup_func: Option<::CRYPTO_EX_dup>, -- free_func: Option<::CRYPTO_EX_free>, -- ) -> c_int; -- // FIXME should take an option -- pub fn SSL_CTX_set_tmp_ecdh_callback( -- ctx: *mut ::SSL_CTX, -- ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int) -- -> *mut ::EC_KEY, -- ); -- pub fn SSL_CTX_sess_set_get_cb( -- ctx: *mut ::SSL_CTX, -- get_session_cb: Option< -- unsafe extern "C" fn(*mut ::SSL, *mut c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, -- >, -- ); -- #[cfg(libressl261)] -- pub fn SSL_CTX_set_min_proto_version(ctx: *mut ::SSL_CTX, version: u16) -> c_int; -- #[cfg(libressl261)] -- pub fn SSL_CTX_set_max_proto_version(ctx: *mut ::SSL_CTX, version: u16) -> c_int; -- #[cfg(libressl270)] -- pub fn SSL_CTX_get_min_proto_version(ctx: *mut ::SSL_CTX) -> c_int; -- #[cfg(libressl270)] -- pub fn SSL_CTX_get_max_proto_version(ctx: *mut ::SSL_CTX) -> c_int; -- -- pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME; -- pub fn X509_get_issuer_name(x: *mut ::X509) -> *mut ::X509_NAME; -- pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_get_ext_d2i( -- x: *mut ::X509, -- nid: c_int, -- crit: *mut c_int, -- idx: *mut c_int, -- ) -> *mut c_void; -- pub fn X509_NAME_add_entry_by_NID( -- x: *mut ::X509_NAME, -- field: c_int, -- ty: c_int, -- bytes: *mut c_uchar, -- len: c_int, -- loc: c_int, -- set: c_int, -- ) -> c_int; -- pub fn X509_NAME_entry_count(n: *mut ::X509_NAME) -> c_int; -- pub fn X509_NAME_get_entry(n: *mut ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY; -- pub fn X509_NAME_ENTRY_get_data(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING; -- pub fn X509_NAME_ENTRY_get_object(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_OBJECT; -- pub fn X509_STORE_CTX_get_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509; -- pub fn X509V3_EXT_nconf_nid( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- ext_nid: c_int, -- value: *mut c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn X509V3_EXT_nconf( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- name: *mut c_char, -- value: *mut c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ::ASN1_STRING) -> c_int; -- pub fn ASN1_STRING_data(x: *mut ::ASN1_STRING) -> *mut c_uchar; -- pub fn CRYPTO_add_lock( -- pointer: *mut c_int, -- amount: c_int, -- type_: c_int, -- file: *const c_char, -- line: c_int, -- ) -> c_int; -- pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; -- pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); -- pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int; -- -- pub fn sk_new_null() -> *mut _STACK; -- pub fn sk_num(st: *const _STACK) -> c_int; -- pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void; -- pub fn sk_free(st: *mut _STACK); -- pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int; -- pub fn sk_pop_free(st: *mut _STACK, free: Option); -- pub fn sk_pop(st: *mut _STACK) -> *mut c_void; -- -- pub fn SSLeay() -> c_ulong; -- pub fn SSLeay_version(key: c_int) -> *const c_char; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v250.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v250.rs +++ /dev/null @@ -1,224 +0,0 @@ ---- src/vendor/openssl-sys/src/libressl/v250.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/libressl/v250.rs -@@ -1,221 +0,0 @@ --use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong, time_t}; -- --use super::*; -- --#[repr(C)] --pub struct SSL { -- version: c_int, -- type_: c_int, -- method: *const ::SSL_METHOD, -- rbio: *mut c_void, -- wbio: *mut c_void, -- bbio: *mut c_void, -- rwstate: c_int, -- in_handshake: c_int, -- handshake_func: Option c_int>, -- pub server: c_int, -- new_session: c_int, -- quiet_shutdown: c_int, -- shutdown: c_int, -- state: c_int, -- rstate: c_int, -- init_buf: *mut c_void, -- init_msg: *mut c_void, -- init_num: c_int, -- init_off: c_int, -- packet: *mut c_uchar, -- packet_length: c_uint, -- s3: *mut c_void, -- d1: *mut c_void, -- read_ahead: c_int, -- msg_callback: Option< -- unsafe extern "C" fn(c_int, -- c_int, -- c_int, -- *const c_void, -- size_t, -- *mut SSL, -- *mut c_void), -- >, -- msg_callback_arg: *mut c_void, -- hit: c_int, -- param: *mut c_void, -- cipher_list: *mut stack_st_SSL_CIPHER, -- cipher_list_by_id: *mut stack_st_SSL_CIPHER, -- mac_flags: c_int, -- aead_read_ctx: *mut c_void, -- enc_read_ctx: *mut ::EVP_CIPHER_CTX, -- read_hash: *mut ::EVP_MD_CTX, -- aead_write_ctx: *mut c_void, -- enc_write_ctx: *mut ::EVP_CIPHER_CTX, -- write_hash: *mut ::EVP_MD_CTX, -- cert: *mut c_void, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -- session: *mut ::SSL_SESSION, -- generate_session_id: ::GEN_SESSION_CB, -- verify_mode: c_int, -- verify_callback: Option c_int>, -- info_callback: Option, -- error: c_int, -- error_code: c_int, -- ctx: *mut ::SSL_CTX, -- debug: c_int, -- verify_result: c_long, -- ex_data: ::CRYPTO_EX_DATA, -- client_CA: *mut stack_st_X509_NAME, -- references: c_int, -- options: c_ulong, -- mode: c_ulong, -- max_cert_list: c_long, -- first_packet: c_int, -- client_version: c_int, -- max_send_fragment: c_uint, -- tlsext_debug_cb: -- Option, -- tlsext_debug_arg: *mut c_void, -- tlsext_hostname: *mut c_char, -- servername_done: c_int, -- tlsext_status_type: c_int, -- tlsext_status_expected: c_int, -- tlsext_ocsp_ids: *mut c_void, -- tlsext_ocsp_exts: *mut c_void, -- tlsext_ocsp_resp: *mut c_uchar, -- tlsext_ocsp_resplen: c_int, -- tlsext_ticket_expected: c_int, -- tlsext_ecpointformatlist_length: size_t, -- tlsext_ecpointformatlist: *mut c_uchar, -- tlsext_ellipticcurvelist_length: size_t, -- tlsext_ellipticcurvelist: *mut c_uchar, -- tlsext_session_ticket: *mut c_void, -- tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn, -- tls_session_ticket_ext_cb_arg: *mut c_void, -- tls_session_secret_cb: ::tls_session_secret_cb_fn, -- tls_session_secret_cb_arg: *mut c_void, -- initial_ctx: *mut ::SSL_CTX, -- next_proto_negotiated: *mut c_uchar, -- next_proto_negotiated_len: c_uchar, -- srtp_profiles: *mut c_void, -- srtp_profile: *mut c_void, -- tlsext_heartbeat: c_uint, -- tlsext_hb_pending: c_uint, -- tlsext_hb_seq: c_uint, -- alpn_client_proto_list: *mut c_uchar, -- alpn_client_proto_list_len: c_uint, -- renegotiate: c_int, --} -- --#[repr(C)] --pub struct SSL_CTX { -- method: *mut c_void, -- cipher_list: *mut c_void, -- cipher_list_by_id: *mut c_void, -- cert_store: *mut c_void, -- sessions: *mut c_void, -- session_cache_size: c_ulong, -- session_cache_head: *mut c_void, -- session_cache_tail: *mut c_void, -- session_cache_mode: c_int, -- session_timeout: c_long, -- new_session_cb: *mut c_void, -- remove_session_cb: *mut c_void, -- get_session_cb: *mut c_void, -- stats: [c_int; 11], -- pub references: c_int, -- app_verify_callback: *mut c_void, -- app_verify_arg: *mut c_void, -- default_passwd_callback: *mut c_void, -- default_passwd_callback_userdata: *mut c_void, -- client_cert_cb: *mut c_void, -- app_gen_cookie_cb: *mut c_void, -- app_verify_cookie_cb: *mut c_void, -- ex_dat: ::CRYPTO_EX_DATA, -- rsa_md5: *mut c_void, -- md5: *mut c_void, -- sha1: *mut c_void, -- extra_certs: *mut c_void, -- comp_methods: *mut c_void, -- info_callback: *mut c_void, -- client_CA: *mut c_void, -- options: c_ulong, -- mode: c_ulong, -- max_cert_list: c_long, -- cert: *mut c_void, -- read_ahead: c_int, -- msg_callback: *mut c_void, -- msg_callback_arg: *mut c_void, -- verify_mode: c_int, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; 32], -- default_verify_callback: *mut c_void, -- generate_session_id: *mut c_void, -- param: *mut c_void, -- quiet_shutdown: c_int, -- max_send_fragment: c_uint, -- -- #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))] -- client_cert_engine: *mut c_void, -- -- tlsext_servername_callback: *mut c_void, -- tlsect_servername_arg: *mut c_void, -- tlsext_tick_key_name: [c_uchar; 16], -- tlsext_tick_hmac_key: [c_uchar; 16], -- tlsext_tick_aes_key: [c_uchar; 16], -- tlsext_ticket_key_cb: *mut c_void, -- tlsext_status_cb: *mut c_void, -- tlsext_status_arg: *mut c_void, -- tlsext_opaque_prf_input_callback: *mut c_void, -- tlsext_opaque_prf_input_callback_arg: *mut c_void, -- -- next_protos_advertised_cb: *mut c_void, -- next_protos_advertised_cb_arg: *mut c_void, -- next_proto_select_cb: *mut c_void, -- next_proto_select_cb_arg: *mut c_void, -- -- srtp_profiles: *mut c_void, --} -- --#[repr(C)] --pub struct SSL_SESSION { -- ssl_version: c_int, -- pub master_key_length: c_int, -- pub master_key: [c_uchar; 48], -- session_id_length: c_uint, -- session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize], -- not_resumable: c_int, -- sess_cert: *mut c_void, -- peer: *mut X509, -- verify_result: c_long, -- timeout: c_long, -- time: time_t, -- pub references: c_int, -- cipher: *const c_void, -- cipher_id: c_ulong, -- ciphers: *mut c_void, -- ex_data: ::CRYPTO_EX_DATA, -- prev: *mut c_void, -- next: *mut c_void, -- tlsext_hostname: *mut c_char, -- tlsext_ecpointformatlist_length: size_t, -- tlsext_ecpointformatlist: *mut u8, -- tlsext_ellipticcurvelist_length: size_t, -- tlsext_ellipticcurvelist: *mut u16, -- tlsext_tick: *mut c_uchar, -- tlsext_ticklen: size_t, -- tlsext_tick_lifetime_hint: c_long, --} -- --#[repr(C)] --pub struct X509_VERIFY_PARAM { -- pub name: *mut c_char, -- pub check_time: time_t, -- pub inh_flags: c_ulong, -- pub flags: c_ulong, -- pub purpose: c_int, -- pub trust: c_int, -- pub depth: c_int, -- pub policies: *mut stack_st_ASN1_OBJECT, -- //pub id: *mut X509_VERIFY_PARAM_ID, --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v251.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v251.rs +++ /dev/null @@ -1,92 +0,0 @@ ---- src/vendor/openssl-sys/src/libressl/v251.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/libressl/v251.rs -@@ -1,89 +0,0 @@ --use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t, time_t}; -- --use super::*; -- --#[repr(C)] --pub struct SSL { -- version: c_int, -- method: *const ::SSL_METHOD, -- rbio: *mut ::BIO, -- wbio: *mut ::BIO, -- bbio: *mut ::BIO, -- pub server: c_int, -- s3: *mut c_void, -- d1: *mut c_void, -- param: *mut c_void, -- cipher_list: *mut stack_st_SSL_CIPHER, -- cert: *mut c_void, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -- session: *mut ::SSL_SESSION, -- verify_mode: c_int, -- error: c_int, -- error_code: c_int, -- ctx: *mut ::SSL_CTX, -- verify_result: c_long, -- references: c_int, -- client_version: c_int, -- max_send_fragment: c_uint, -- tlsext_hostname: *mut c_char, -- tlsext_status_type: c_int, -- initial_ctx: *mut ::SSL_CTX, -- enc_read_ctx: *mut ::EVP_CIPHER_CTX, -- read_hash: *mut EVP_MD_CTX, -- internal: *mut c_void, --} -- --#[repr(C)] --pub struct SSL_CTX { -- method: *const ::SSL_METHOD, -- cipher_list: *mut stack_st_SSL_CIPHER, -- cert_store: *mut c_void, -- session_timeout: c_long, -- pub references: c_int, -- extra_certs: *mut stack_st_X509, -- verify_mode: c_int, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -- param: *mut ::X509_VERIFY_PARAM, -- default_passwd_callback: *mut c_void, -- default_passwd_callback_userdata: *mut c_void, -- internal: *mut c_void, --} -- --#[repr(C)] --pub struct SSL_SESSION { -- ssl_version: c_int, -- pub master_key_length: c_int, -- pub master_key: [c_uchar; 48], -- session_id_length: c_uint, -- session_id: [c_uchar; ::SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -- peer: *mut ::X509, -- verify_result: c_long, -- timeout: c_long, -- time: time_t, -- pub references: c_int, -- cipher: *const ::SSL_CIPHER, -- cipher_id: c_long, -- ciphers: *mut stack_st_SSL_CIPHER, -- tlsext_hostname: *mut c_char, -- tlsext_tick: *mut c_uchar, -- tlsext_ticklen: size_t, -- tlsext_tick_lifetime_int: c_long, -- internal: *mut c_void, --} -- --#[repr(C)] --pub struct X509_VERIFY_PARAM { -- pub name: *mut c_char, -- pub check_time: time_t, -- pub inh_flags: c_ulong, -- pub flags: c_ulong, -- pub purpose: c_int, -- pub trust: c_int, -- pub depth: c_int, -- pub policies: *mut stack_st_ASN1_OBJECT, -- id: *mut c_void, --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v273.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_libressl_v273.rs +++ /dev/null @@ -1,125 +0,0 @@ ---- src/vendor/openssl-sys/src/libressl/v273.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/libressl/v273.rs -@@ -1,122 +0,0 @@ --use libc::{c_char, c_int, c_long, c_uchar, c_void, size_t}; -- --extern "C" { -- pub fn ASN1_STRING_get0_data(x: *const ::ASN1_STRING) -> *const c_uchar; -- -- pub fn BIO_set_init(a: *mut ::BIO, init: c_int); -- pub fn BIO_set_data(a: *mut ::BIO, data: *mut c_void); -- pub fn BIO_get_data(a: *mut ::BIO) -> *mut c_void; -- pub fn BIO_meth_new(type_: c_int, name: *const c_char) -> *mut ::BIO_METHOD; -- pub fn BIO_meth_free(biom: *mut ::BIO_METHOD); -- // FIXME should wrap in Option -- pub fn BIO_meth_set_write( -- biom: *mut ::BIO_METHOD, -- write: unsafe extern "C" fn(*mut ::BIO, *const c_char, c_int) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_read( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_puts( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, *const c_char) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_ctrl( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long, -- ) -> c_int; -- pub fn BIO_meth_set_create( -- biom: *mut ::BIO_METHOD, -- create: unsafe extern "C" fn(*mut ::BIO) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_destroy( -- biom: *mut ::BIO_METHOD, -- destroy: unsafe extern "C" fn(*mut ::BIO) -> c_int, -- ) -> c_int; -- -- pub fn DH_set0_pqg( -- dh: *mut ::DH, -- p: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- g: *mut ::BIGNUM, -- ) -> c_int; -- -- pub fn DSA_get0_pqg( -- d: *const ::DSA, -- p: *mut *const ::BIGNUM, -- q: *mut *const ::BIGNUM, -- q: *mut *const ::BIGNUM, -- ); -- pub fn DSA_set0_pqg( -- d: *mut ::DSA, -- p: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- ) -> c_int; -- pub fn DSA_get0_key( -- d: *const ::DSA, -- pub_key: *mut *const ::BIGNUM, -- priv_key: *mut *const ::BIGNUM, -- ); -- pub fn DSA_set0_key( -- d: *mut ::DSA, -- pub_key: *mut ::BIGNUM, -- priv_key: *mut ::BIGNUM, -- ) -> c_int; -- -- pub fn ECDSA_SIG_get0( -- sig: *const ::ECDSA_SIG, -- pr: *mut *const ::BIGNUM, -- ps: *mut *const ::BIGNUM, -- ); -- pub fn ECDSA_SIG_set0(sig: *mut ::ECDSA_SIG, pr: *mut ::BIGNUM, ps: *mut ::BIGNUM) -> c_int; -- -- pub fn EVP_CIPHER_key_length(cipher: *const ::EVP_CIPHER) -> c_int; -- pub fn EVP_CIPHER_block_size(cipher: *const ::EVP_CIPHER) -> c_int; -- pub fn EVP_CIPHER_iv_length(cipher: *const ::EVP_CIPHER) -> c_int; -- -- pub fn RSA_get0_key( -- r: *const ::RSA, -- n: *mut *const ::BIGNUM, -- e: *mut *const ::BIGNUM, -- d: *mut *const ::BIGNUM, -- ); -- pub fn RSA_get0_factors(r: *const ::RSA, p: *mut *const ::BIGNUM, q: *mut *const ::BIGNUM); -- pub fn RSA_get0_crt_params( -- r: *const ::RSA, -- dmp1: *mut *const ::BIGNUM, -- dmq1: *mut *const ::BIGNUM, -- iqmp: *mut *const ::BIGNUM, -- ); -- pub fn RSA_set0_key( -- r: *mut ::RSA, -- n: *mut ::BIGNUM, -- e: *mut ::BIGNUM, -- d: *mut ::BIGNUM, -- ) -> c_int; -- pub fn RSA_set0_factors(r: *mut ::RSA, p: *mut ::BIGNUM, q: *mut ::BIGNUM) -> c_int; -- pub fn RSA_set0_crt_params( -- r: *mut ::RSA, -- dmp1: *mut ::BIGNUM, -- dmq1: *mut ::BIGNUM, -- iqmp: *mut ::BIGNUM, -- ) -> c_int; -- -- pub fn SSL_CTX_up_ref(x: *mut ::SSL_CTX) -> c_int; -- -- pub fn SSL_SESSION_get_master_key( -- session: *const ::SSL_SESSION, -- out: *mut c_uchar, -- outlen: size_t, -- ) -> size_t; -- pub fn SSL_SESSION_up_ref(ses: *mut ::SSL_SESSION) -> c_int; -- -- pub fn X509_getm_notAfter(x: *const ::X509) -> *mut ::ASN1_TIME; -- pub fn X509_getm_notBefore(x: *const ::X509) -> *mut ::ASN1_TIME; -- pub fn X509_get0_signature( -- psig: *mut *const ::ASN1_BIT_STRING, -- palg: *mut *const ::X509_ALGOR, -- x: *const ::X509, -- ); -- pub fn X509_up_ref(x: *mut ::X509) -> c_int; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_macros.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_macros.rs +++ /dev/null @@ -1,72 +0,0 @@ ---- src/vendor/openssl-sys/src/macros.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/macros.rs -@@ -0,0 +1,69 @@ -+// vendored from the cfg-if crate to avoid breaking ctest -+macro_rules! cfg_if { -+ // match if/else chains with a final `else` -+ ($( -+ if #[cfg($($meta:meta),*)] { $($it:item)* } -+ ) else * else { -+ $($it2:item)* -+ }) => { -+ cfg_if! { -+ @__items -+ () ; -+ $( ( ($($meta),*) ($($it)*) ), )* -+ ( () ($($it2)*) ), -+ } -+ }; -+ -+ // match if/else chains lacking a final `else` -+ ( -+ if #[cfg($($i_met:meta),*)] { $($i_it:item)* } -+ $( -+ else if #[cfg($($e_met:meta),*)] { $($e_it:item)* } -+ )* -+ ) => { -+ cfg_if! { -+ @__items -+ () ; -+ ( ($($i_met),*) ($($i_it)*) ), -+ $( ( ($($e_met),*) ($($e_it)*) ), )* -+ ( () () ), -+ } -+ }; -+ -+ // Internal and recursive macro to emit all the items -+ // -+ // Collects all the negated cfgs in a list at the beginning and after the -+ // semicolon is all the remaining items -+ (@__items ($($not:meta,)*) ; ) => {}; -+ (@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => { -+ // Emit all items within one block, applying an approprate #[cfg]. The -+ // #[cfg] will require all `$m` matchers specified and must also negate -+ // all previous matchers. -+ cfg_if! { @__apply cfg(all($($m,)* not(any($($not),*)))), $($it)* } -+ -+ // Recurse to emit all other items in `$rest`, and when we do so add all -+ // our `$m` matchers to the list of `$not` matchers as future emissions -+ // will have to negate everything we just matched as well. -+ cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* } -+ }; -+ -+ // Internal macro to Apply a cfg attribute to a list of items -+ (@__apply $m:meta, $($it:item)*) => { -+ $(#[$m] $it)* -+ }; -+} -+ -+macro_rules! stack { -+ ($t:ident) => { -+ cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum $t {} -+ } else { -+ #[repr(C)] -+ pub struct $t { -+ pub stack: ::_STACK, -+ } -+ } -+ } -+ } -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_obj__mac.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_obj__mac.rs +++ /dev/null @@ -1,917 +0,0 @@ ---- src/vendor/openssl-sys/src/obj_mac.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/obj_mac.rs -@@ -0,0 +1,914 @@ -+use libc::*; -+ -+pub const NID_undef: c_int = 0; -+pub const NID_itu_t: c_int = 645; -+pub const NID_ccitt: c_int = 404; -+pub const NID_iso: c_int = 181; -+pub const NID_joint_iso_itu_t: c_int = 646; -+pub const NID_joint_iso_ccitt: c_int = 393; -+pub const NID_member_body: c_int = 182; -+pub const NID_identified_organization: c_int = 676; -+pub const NID_hmac_md5: c_int = 780; -+pub const NID_hmac_sha1: c_int = 781; -+pub const NID_certicom_arc: c_int = 677; -+pub const NID_international_organizations: c_int = 647; -+pub const NID_wap: c_int = 678; -+pub const NID_wap_wsg: c_int = 679; -+pub const NID_selected_attribute_types: c_int = 394; -+pub const NID_clearance: c_int = 395; -+pub const NID_ISO_US: c_int = 183; -+pub const NID_X9_57: c_int = 184; -+pub const NID_X9cm: c_int = 185; -+pub const NID_dsa: c_int = 116; -+pub const NID_dsaWithSHA1: c_int = 113; -+pub const NID_ansi_X9_62: c_int = 405; -+pub const NID_X9_62_prime_field: c_int = 406; -+pub const NID_X9_62_characteristic_two_field: c_int = 407; -+pub const NID_X9_62_id_characteristic_two_basis: c_int = 680; -+pub const NID_X9_62_onBasis: c_int = 681; -+pub const NID_X9_62_tpBasis: c_int = 682; -+pub const NID_X9_62_ppBasis: c_int = 683; -+pub const NID_X9_62_id_ecPublicKey: c_int = 408; -+pub const NID_X9_62_c2pnb163v1: c_int = 684; -+pub const NID_X9_62_c2pnb163v2: c_int = 685; -+pub const NID_X9_62_c2pnb163v3: c_int = 686; -+pub const NID_X9_62_c2pnb176v1: c_int = 687; -+pub const NID_X9_62_c2tnb191v1: c_int = 688; -+pub const NID_X9_62_c2tnb191v2: c_int = 689; -+pub const NID_X9_62_c2tnb191v3: c_int = 690; -+pub const NID_X9_62_c2onb191v4: c_int = 691; -+pub const NID_X9_62_c2onb191v5: c_int = 692; -+pub const NID_X9_62_c2pnb208w1: c_int = 693; -+pub const NID_X9_62_c2tnb239v1: c_int = 694; -+pub const NID_X9_62_c2tnb239v2: c_int = 695; -+pub const NID_X9_62_c2tnb239v3: c_int = 696; -+pub const NID_X9_62_c2onb239v4: c_int = 697; -+pub const NID_X9_62_c2onb239v5: c_int = 698; -+pub const NID_X9_62_c2pnb272w1: c_int = 699; -+pub const NID_X9_62_c2pnb304w1: c_int = 700; -+pub const NID_X9_62_c2tnb359v1: c_int = 701; -+pub const NID_X9_62_c2pnb368w1: c_int = 702; -+pub const NID_X9_62_c2tnb431r1: c_int = 703; -+pub const NID_X9_62_prime192v1: c_int = 409; -+pub const NID_X9_62_prime192v2: c_int = 410; -+pub const NID_X9_62_prime192v3: c_int = 411; -+pub const NID_X9_62_prime239v1: c_int = 412; -+pub const NID_X9_62_prime239v2: c_int = 413; -+pub const NID_X9_62_prime239v3: c_int = 414; -+pub const NID_X9_62_prime256v1: c_int = 415; -+pub const NID_ecdsa_with_SHA1: c_int = 416; -+pub const NID_ecdsa_with_Recommended: c_int = 791; -+pub const NID_ecdsa_with_Specified: c_int = 792; -+pub const NID_ecdsa_with_SHA224: c_int = 793; -+pub const NID_ecdsa_with_SHA256: c_int = 794; -+pub const NID_ecdsa_with_SHA384: c_int = 795; -+pub const NID_ecdsa_with_SHA512: c_int = 796; -+pub const NID_secp112r1: c_int = 704; -+pub const NID_secp112r2: c_int = 705; -+pub const NID_secp128r1: c_int = 706; -+pub const NID_secp128r2: c_int = 707; -+pub const NID_secp160k1: c_int = 708; -+pub const NID_secp160r1: c_int = 709; -+pub const NID_secp160r2: c_int = 710; -+pub const NID_secp192k1: c_int = 711; -+pub const NID_secp224k1: c_int = 712; -+pub const NID_secp224r1: c_int = 713; -+pub const NID_secp256k1: c_int = 714; -+pub const NID_secp384r1: c_int = 715; -+pub const NID_secp521r1: c_int = 716; -+pub const NID_sect113r1: c_int = 717; -+pub const NID_sect113r2: c_int = 718; -+pub const NID_sect131r1: c_int = 719; -+pub const NID_sect131r2: c_int = 720; -+pub const NID_sect163k1: c_int = 721; -+pub const NID_sect163r1: c_int = 722; -+pub const NID_sect163r2: c_int = 723; -+pub const NID_sect193r1: c_int = 724; -+pub const NID_sect193r2: c_int = 725; -+pub const NID_sect233k1: c_int = 726; -+pub const NID_sect233r1: c_int = 727; -+pub const NID_sect239k1: c_int = 728; -+pub const NID_sect283k1: c_int = 729; -+pub const NID_sect283r1: c_int = 730; -+pub const NID_sect409k1: c_int = 731; -+pub const NID_sect409r1: c_int = 732; -+pub const NID_sect571k1: c_int = 733; -+pub const NID_sect571r1: c_int = 734; -+pub const NID_wap_wsg_idm_ecid_wtls1: c_int = 735; -+pub const NID_wap_wsg_idm_ecid_wtls3: c_int = 736; -+pub const NID_wap_wsg_idm_ecid_wtls4: c_int = 737; -+pub const NID_wap_wsg_idm_ecid_wtls5: c_int = 738; -+pub const NID_wap_wsg_idm_ecid_wtls6: c_int = 739; -+pub const NID_wap_wsg_idm_ecid_wtls7: c_int = 740; -+pub const NID_wap_wsg_idm_ecid_wtls8: c_int = 741; -+pub const NID_wap_wsg_idm_ecid_wtls9: c_int = 742; -+pub const NID_wap_wsg_idm_ecid_wtls10: c_int = 743; -+pub const NID_wap_wsg_idm_ecid_wtls11: c_int = 744; -+pub const NID_wap_wsg_idm_ecid_wtls12: c_int = 745; -+pub const NID_cast5_cbc: c_int = 108; -+pub const NID_cast5_ecb: c_int = 109; -+pub const NID_cast5_cfb64: c_int = 110; -+pub const NID_cast5_ofb64: c_int = 111; -+pub const NID_pbeWithMD5AndCast5_CBC: c_int = 112; -+pub const NID_id_PasswordBasedMAC: c_int = 782; -+pub const NID_id_DHBasedMac: c_int = 783; -+pub const NID_rsadsi: c_int = 1; -+pub const NID_pkcs: c_int = 2; -+pub const NID_pkcs1: c_int = 186; -+pub const NID_rsaEncryption: c_int = 6; -+pub const NID_md2WithRSAEncryption: c_int = 7; -+pub const NID_md4WithRSAEncryption: c_int = 396; -+pub const NID_md5WithRSAEncryption: c_int = 8; -+pub const NID_sha1WithRSAEncryption: c_int = 65; -+pub const NID_rsaesOaep: c_int = 919; -+pub const NID_mgf1: c_int = 911; -+pub const NID_rsassaPss: c_int = 912; -+pub const NID_sha256WithRSAEncryption: c_int = 668; -+pub const NID_sha384WithRSAEncryption: c_int = 669; -+pub const NID_sha512WithRSAEncryption: c_int = 670; -+pub const NID_sha224WithRSAEncryption: c_int = 671; -+pub const NID_pkcs3: c_int = 27; -+pub const NID_dhKeyAgreement: c_int = 28; -+pub const NID_pkcs5: c_int = 187; -+pub const NID_pbeWithMD2AndDES_CBC: c_int = 9; -+pub const NID_pbeWithMD5AndDES_CBC: c_int = 10; -+pub const NID_pbeWithMD2AndRC2_CBC: c_int = 168; -+pub const NID_pbeWithMD5AndRC2_CBC: c_int = 169; -+pub const NID_pbeWithSHA1AndDES_CBC: c_int = 170; -+pub const NID_pbeWithSHA1AndRC2_CBC: c_int = 68; -+pub const NID_id_pbkdf2: c_int = 69; -+pub const NID_pbes2: c_int = 161; -+pub const NID_pbmac1: c_int = 162; -+pub const NID_pkcs7: c_int = 20; -+pub const NID_pkcs7_data: c_int = 21; -+pub const NID_pkcs7_signed: c_int = 22; -+pub const NID_pkcs7_enveloped: c_int = 23; -+pub const NID_pkcs7_signedAndEnveloped: c_int = 24; -+pub const NID_pkcs7_digest: c_int = 25; -+pub const NID_pkcs7_encrypted: c_int = 26; -+pub const NID_pkcs9: c_int = 47; -+pub const NID_pkcs9_emailAddress: c_int = 48; -+pub const NID_pkcs9_unstructuredName: c_int = 49; -+pub const NID_pkcs9_contentType: c_int = 50; -+pub const NID_pkcs9_messageDigest: c_int = 51; -+pub const NID_pkcs9_signingTime: c_int = 52; -+pub const NID_pkcs9_countersignature: c_int = 53; -+pub const NID_pkcs9_challengePassword: c_int = 54; -+pub const NID_pkcs9_unstructuredAddress: c_int = 55; -+pub const NID_pkcs9_extCertAttributes: c_int = 56; -+pub const NID_ext_req: c_int = 172; -+pub const NID_SMIMECapabilities: c_int = 167; -+pub const NID_SMIME: c_int = 188; -+pub const NID_id_smime_mod: c_int = 189; -+pub const NID_id_smime_ct: c_int = 190; -+pub const NID_id_smime_aa: c_int = 191; -+pub const NID_id_smime_alg: c_int = 192; -+pub const NID_id_smime_cd: c_int = 193; -+pub const NID_id_smime_spq: c_int = 194; -+pub const NID_id_smime_cti: c_int = 195; -+pub const NID_id_smime_mod_cms: c_int = 196; -+pub const NID_id_smime_mod_ess: c_int = 197; -+pub const NID_id_smime_mod_oid: c_int = 198; -+pub const NID_id_smime_mod_msg_v3: c_int = 199; -+pub const NID_id_smime_mod_ets_eSignature_88: c_int = 200; -+pub const NID_id_smime_mod_ets_eSignature_97: c_int = 201; -+pub const NID_id_smime_mod_ets_eSigPolicy_88: c_int = 202; -+pub const NID_id_smime_mod_ets_eSigPolicy_97: c_int = 203; -+pub const NID_id_smime_ct_receipt: c_int = 204; -+pub const NID_id_smime_ct_authData: c_int = 205; -+pub const NID_id_smime_ct_publishCert: c_int = 206; -+pub const NID_id_smime_ct_TSTInfo: c_int = 207; -+pub const NID_id_smime_ct_TDTInfo: c_int = 208; -+pub const NID_id_smime_ct_contentInfo: c_int = 209; -+pub const NID_id_smime_ct_DVCSRequestData: c_int = 210; -+pub const NID_id_smime_ct_DVCSResponseData: c_int = 211; -+pub const NID_id_smime_ct_compressedData: c_int = 786; -+pub const NID_id_ct_asciiTextWithCRLF: c_int = 787; -+pub const NID_id_smime_aa_receiptRequest: c_int = 212; -+pub const NID_id_smime_aa_securityLabel: c_int = 213; -+pub const NID_id_smime_aa_mlExpandHistory: c_int = 214; -+pub const NID_id_smime_aa_contentHint: c_int = 215; -+pub const NID_id_smime_aa_msgSigDigest: c_int = 216; -+pub const NID_id_smime_aa_encapContentType: c_int = 217; -+pub const NID_id_smime_aa_contentIdentifier: c_int = 218; -+pub const NID_id_smime_aa_macValue: c_int = 219; -+pub const NID_id_smime_aa_equivalentLabels: c_int = 220; -+pub const NID_id_smime_aa_contentReference: c_int = 221; -+pub const NID_id_smime_aa_encrypKeyPref: c_int = 222; -+pub const NID_id_smime_aa_signingCertificate: c_int = 223; -+pub const NID_id_smime_aa_smimeEncryptCerts: c_int = 224; -+pub const NID_id_smime_aa_timeStampToken: c_int = 225; -+pub const NID_id_smime_aa_ets_sigPolicyId: c_int = 226; -+pub const NID_id_smime_aa_ets_commitmentType: c_int = 227; -+pub const NID_id_smime_aa_ets_signerLocation: c_int = 228; -+pub const NID_id_smime_aa_ets_signerAttr: c_int = 229; -+pub const NID_id_smime_aa_ets_otherSigCert: c_int = 230; -+pub const NID_id_smime_aa_ets_contentTimestamp: c_int = 231; -+pub const NID_id_smime_aa_ets_CertificateRefs: c_int = 232; -+pub const NID_id_smime_aa_ets_RevocationRefs: c_int = 233; -+pub const NID_id_smime_aa_ets_certValues: c_int = 234; -+pub const NID_id_smime_aa_ets_revocationValues: c_int = 235; -+pub const NID_id_smime_aa_ets_escTimeStamp: c_int = 236; -+pub const NID_id_smime_aa_ets_certCRLTimestamp: c_int = 237; -+pub const NID_id_smime_aa_ets_archiveTimeStamp: c_int = 238; -+pub const NID_id_smime_aa_signatureType: c_int = 239; -+pub const NID_id_smime_aa_dvcs_dvc: c_int = 240; -+pub const NID_id_smime_alg_ESDHwith3DES: c_int = 241; -+pub const NID_id_smime_alg_ESDHwithRC2: c_int = 242; -+pub const NID_id_smime_alg_3DESwrap: c_int = 243; -+pub const NID_id_smime_alg_RC2wrap: c_int = 244; -+pub const NID_id_smime_alg_ESDH: c_int = 245; -+pub const NID_id_smime_alg_CMS3DESwrap: c_int = 246; -+pub const NID_id_smime_alg_CMSRC2wrap: c_int = 247; -+pub const NID_id_alg_PWRI_KEK: c_int = 893; -+pub const NID_id_smime_cd_ldap: c_int = 248; -+pub const NID_id_smime_spq_ets_sqt_uri: c_int = 249; -+pub const NID_id_smime_spq_ets_sqt_unotice: c_int = 250; -+pub const NID_id_smime_cti_ets_proofOfOrigin: c_int = 251; -+pub const NID_id_smime_cti_ets_proofOfReceipt: c_int = 252; -+pub const NID_id_smime_cti_ets_proofOfDelivery: c_int = 253; -+pub const NID_id_smime_cti_ets_proofOfSender: c_int = 254; -+pub const NID_id_smime_cti_ets_proofOfApproval: c_int = 255; -+pub const NID_id_smime_cti_ets_proofOfCreation: c_int = 256; -+pub const NID_friendlyName: c_int = 156; -+pub const NID_localKeyID: c_int = 157; -+pub const NID_ms_csp_name: c_int = 417; -+pub const NID_LocalKeySet: c_int = 856; -+pub const NID_x509Certificate: c_int = 158; -+pub const NID_sdsiCertificate: c_int = 159; -+pub const NID_x509Crl: c_int = 160; -+pub const NID_pbe_WithSHA1And128BitRC4: c_int = 144; -+pub const NID_pbe_WithSHA1And40BitRC4: c_int = 145; -+pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: c_int = 146; -+pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: c_int = 147; -+pub const NID_pbe_WithSHA1And128BitRC2_CBC: c_int = 148; -+pub const NID_pbe_WithSHA1And40BitRC2_CBC: c_int = 149; -+pub const NID_keyBag: c_int = 150; -+pub const NID_pkcs8ShroudedKeyBag: c_int = 151; -+pub const NID_certBag: c_int = 152; -+pub const NID_crlBag: c_int = 153; -+pub const NID_secretBag: c_int = 154; -+pub const NID_safeContentsBag: c_int = 155; -+pub const NID_md2: c_int = 3; -+pub const NID_md4: c_int = 257; -+pub const NID_md5: c_int = 4; -+pub const NID_md5_sha1: c_int = 114; -+pub const NID_hmacWithMD5: c_int = 797; -+pub const NID_hmacWithSHA1: c_int = 163; -+pub const NID_hmacWithSHA224: c_int = 798; -+pub const NID_hmacWithSHA256: c_int = 799; -+pub const NID_hmacWithSHA384: c_int = 800; -+pub const NID_hmacWithSHA512: c_int = 801; -+pub const NID_rc2_cbc: c_int = 37; -+pub const NID_rc2_ecb: c_int = 38; -+pub const NID_rc2_cfb64: c_int = 39; -+pub const NID_rc2_ofb64: c_int = 40; -+pub const NID_rc2_40_cbc: c_int = 98; -+pub const NID_rc2_64_cbc: c_int = 166; -+pub const NID_rc4: c_int = 5; -+pub const NID_rc4_40: c_int = 97; -+pub const NID_des_ede3_cbc: c_int = 44; -+pub const NID_rc5_cbc: c_int = 120; -+pub const NID_rc5_ecb: c_int = 121; -+pub const NID_rc5_cfb64: c_int = 122; -+pub const NID_rc5_ofb64: c_int = 123; -+pub const NID_ms_ext_req: c_int = 171; -+pub const NID_ms_code_ind: c_int = 134; -+pub const NID_ms_code_com: c_int = 135; -+pub const NID_ms_ctl_sign: c_int = 136; -+pub const NID_ms_sgc: c_int = 137; -+pub const NID_ms_efs: c_int = 138; -+pub const NID_ms_smartcard_login: c_int = 648; -+pub const NID_ms_upn: c_int = 649; -+pub const NID_idea_cbc: c_int = 34; -+pub const NID_idea_ecb: c_int = 36; -+pub const NID_idea_cfb64: c_int = 35; -+pub const NID_idea_ofb64: c_int = 46; -+pub const NID_bf_cbc: c_int = 91; -+pub const NID_bf_ecb: c_int = 92; -+pub const NID_bf_cfb64: c_int = 93; -+pub const NID_bf_ofb64: c_int = 94; -+pub const NID_id_pkix: c_int = 127; -+pub const NID_id_pkix_mod: c_int = 258; -+pub const NID_id_pe: c_int = 175; -+pub const NID_id_qt: c_int = 259; -+pub const NID_id_kp: c_int = 128; -+pub const NID_id_it: c_int = 260; -+pub const NID_id_pkip: c_int = 261; -+pub const NID_id_alg: c_int = 262; -+pub const NID_id_cmc: c_int = 263; -+pub const NID_id_on: c_int = 264; -+pub const NID_id_pda: c_int = 265; -+pub const NID_id_aca: c_int = 266; -+pub const NID_id_qcs: c_int = 267; -+pub const NID_id_cct: c_int = 268; -+pub const NID_id_ppl: c_int = 662; -+pub const NID_id_ad: c_int = 176; -+pub const NID_id_pkix1_explicit_88: c_int = 269; -+pub const NID_id_pkix1_implicit_88: c_int = 270; -+pub const NID_id_pkix1_explicit_93: c_int = 271; -+pub const NID_id_pkix1_implicit_93: c_int = 272; -+pub const NID_id_mod_crmf: c_int = 273; -+pub const NID_id_mod_cmc: c_int = 274; -+pub const NID_id_mod_kea_profile_88: c_int = 275; -+pub const NID_id_mod_kea_profile_93: c_int = 276; -+pub const NID_id_mod_cmp: c_int = 277; -+pub const NID_id_mod_qualified_cert_88: c_int = 278; -+pub const NID_id_mod_qualified_cert_93: c_int = 279; -+pub const NID_id_mod_attribute_cert: c_int = 280; -+pub const NID_id_mod_timestamp_protocol: c_int = 281; -+pub const NID_id_mod_ocsp: c_int = 282; -+pub const NID_id_mod_dvcs: c_int = 283; -+pub const NID_id_mod_cmp2000: c_int = 284; -+pub const NID_info_access: c_int = 177; -+pub const NID_biometricInfo: c_int = 285; -+pub const NID_qcStatements: c_int = 286; -+pub const NID_ac_auditEntity: c_int = 287; -+pub const NID_ac_targeting: c_int = 288; -+pub const NID_aaControls: c_int = 289; -+pub const NID_sbgp_ipAddrBlock: c_int = 290; -+pub const NID_sbgp_autonomousSysNum: c_int = 291; -+pub const NID_sbgp_routerIdentifier: c_int = 292; -+pub const NID_ac_proxying: c_int = 397; -+pub const NID_sinfo_access: c_int = 398; -+pub const NID_proxyCertInfo: c_int = 663; -+pub const NID_id_qt_cps: c_int = 164; -+pub const NID_id_qt_unotice: c_int = 165; -+pub const NID_textNotice: c_int = 293; -+pub const NID_server_auth: c_int = 129; -+pub const NID_client_auth: c_int = 130; -+pub const NID_code_sign: c_int = 131; -+pub const NID_email_protect: c_int = 132; -+pub const NID_ipsecEndSystem: c_int = 294; -+pub const NID_ipsecTunnel: c_int = 295; -+pub const NID_ipsecUser: c_int = 296; -+pub const NID_time_stamp: c_int = 133; -+pub const NID_OCSP_sign: c_int = 180; -+pub const NID_dvcs: c_int = 297; -+pub const NID_id_it_caProtEncCert: c_int = 298; -+pub const NID_id_it_signKeyPairTypes: c_int = 299; -+pub const NID_id_it_encKeyPairTypes: c_int = 300; -+pub const NID_id_it_preferredSymmAlg: c_int = 301; -+pub const NID_id_it_caKeyUpdateInfo: c_int = 302; -+pub const NID_id_it_currentCRL: c_int = 303; -+pub const NID_id_it_unsupportedOIDs: c_int = 304; -+pub const NID_id_it_subscriptionRequest: c_int = 305; -+pub const NID_id_it_subscriptionResponse: c_int = 306; -+pub const NID_id_it_keyPairParamReq: c_int = 307; -+pub const NID_id_it_keyPairParamRep: c_int = 308; -+pub const NID_id_it_revPassphrase: c_int = 309; -+pub const NID_id_it_implicitConfirm: c_int = 310; -+pub const NID_id_it_confirmWaitTime: c_int = 311; -+pub const NID_id_it_origPKIMessage: c_int = 312; -+pub const NID_id_it_suppLangTags: c_int = 784; -+pub const NID_id_regCtrl: c_int = 313; -+pub const NID_id_regInfo: c_int = 314; -+pub const NID_id_regCtrl_regToken: c_int = 315; -+pub const NID_id_regCtrl_authenticator: c_int = 316; -+pub const NID_id_regCtrl_pkiPublicationInfo: c_int = 317; -+pub const NID_id_regCtrl_pkiArchiveOptions: c_int = 318; -+pub const NID_id_regCtrl_oldCertID: c_int = 319; -+pub const NID_id_regCtrl_protocolEncrKey: c_int = 320; -+pub const NID_id_regInfo_utf8Pairs: c_int = 321; -+pub const NID_id_regInfo_certReq: c_int = 322; -+pub const NID_id_alg_des40: c_int = 323; -+pub const NID_id_alg_noSignature: c_int = 324; -+pub const NID_id_alg_dh_sig_hmac_sha1: c_int = 325; -+pub const NID_id_alg_dh_pop: c_int = 326; -+pub const NID_id_cmc_statusInfo: c_int = 327; -+pub const NID_id_cmc_identification: c_int = 328; -+pub const NID_id_cmc_identityProof: c_int = 329; -+pub const NID_id_cmc_dataReturn: c_int = 330; -+pub const NID_id_cmc_transactionId: c_int = 331; -+pub const NID_id_cmc_senderNonce: c_int = 332; -+pub const NID_id_cmc_recipientNonce: c_int = 333; -+pub const NID_id_cmc_addExtensions: c_int = 334; -+pub const NID_id_cmc_encryptedPOP: c_int = 335; -+pub const NID_id_cmc_decryptedPOP: c_int = 336; -+pub const NID_id_cmc_lraPOPWitness: c_int = 337; -+pub const NID_id_cmc_getCert: c_int = 338; -+pub const NID_id_cmc_getCRL: c_int = 339; -+pub const NID_id_cmc_revokeRequest: c_int = 340; -+pub const NID_id_cmc_regInfo: c_int = 341; -+pub const NID_id_cmc_responseInfo: c_int = 342; -+pub const NID_id_cmc_queryPending: c_int = 343; -+pub const NID_id_cmc_popLinkRandom: c_int = 344; -+pub const NID_id_cmc_popLinkWitness: c_int = 345; -+pub const NID_id_cmc_confirmCertAcceptance: c_int = 346; -+pub const NID_id_on_personalData: c_int = 347; -+pub const NID_id_on_permanentIdentifier: c_int = 858; -+pub const NID_id_pda_dateOfBirth: c_int = 348; -+pub const NID_id_pda_placeOfBirth: c_int = 349; -+pub const NID_id_pda_gender: c_int = 351; -+pub const NID_id_pda_countryOfCitizenship: c_int = 352; -+pub const NID_id_pda_countryOfResidence: c_int = 353; -+pub const NID_id_aca_authenticationInfo: c_int = 354; -+pub const NID_id_aca_accessIdentity: c_int = 355; -+pub const NID_id_aca_chargingIdentity: c_int = 356; -+pub const NID_id_aca_group: c_int = 357; -+pub const NID_id_aca_role: c_int = 358; -+pub const NID_id_aca_encAttrs: c_int = 399; -+pub const NID_id_qcs_pkixQCSyntax_v1: c_int = 359; -+pub const NID_id_cct_crs: c_int = 360; -+pub const NID_id_cct_PKIData: c_int = 361; -+pub const NID_id_cct_PKIResponse: c_int = 362; -+pub const NID_id_ppl_anyLanguage: c_int = 664; -+pub const NID_id_ppl_inheritAll: c_int = 665; -+pub const NID_Independent: c_int = 667; -+pub const NID_ad_OCSP: c_int = 178; -+pub const NID_ad_ca_issuers: c_int = 179; -+pub const NID_ad_timeStamping: c_int = 363; -+pub const NID_ad_dvcs: c_int = 364; -+pub const NID_caRepository: c_int = 785; -+pub const NID_id_pkix_OCSP_basic: c_int = 365; -+pub const NID_id_pkix_OCSP_Nonce: c_int = 366; -+pub const NID_id_pkix_OCSP_CrlID: c_int = 367; -+pub const NID_id_pkix_OCSP_acceptableResponses: c_int = 368; -+pub const NID_id_pkix_OCSP_noCheck: c_int = 369; -+pub const NID_id_pkix_OCSP_archiveCutoff: c_int = 370; -+pub const NID_id_pkix_OCSP_serviceLocator: c_int = 371; -+pub const NID_id_pkix_OCSP_extendedStatus: c_int = 372; -+pub const NID_id_pkix_OCSP_valid: c_int = 373; -+pub const NID_id_pkix_OCSP_path: c_int = 374; -+pub const NID_id_pkix_OCSP_trustRoot: c_int = 375; -+pub const NID_algorithm: c_int = 376; -+pub const NID_md5WithRSA: c_int = 104; -+pub const NID_des_ecb: c_int = 29; -+pub const NID_des_cbc: c_int = 31; -+pub const NID_des_ofb64: c_int = 45; -+pub const NID_des_cfb64: c_int = 30; -+pub const NID_rsaSignature: c_int = 377; -+pub const NID_dsa_2: c_int = 67; -+pub const NID_dsaWithSHA: c_int = 66; -+pub const NID_shaWithRSAEncryption: c_int = 42; -+pub const NID_des_ede_ecb: c_int = 32; -+pub const NID_des_ede3_ecb: c_int = 33; -+pub const NID_des_ede_cbc: c_int = 43; -+pub const NID_des_ede_cfb64: c_int = 60; -+pub const NID_des_ede3_cfb64: c_int = 61; -+pub const NID_des_ede_ofb64: c_int = 62; -+pub const NID_des_ede3_ofb64: c_int = 63; -+pub const NID_desx_cbc: c_int = 80; -+pub const NID_sha: c_int = 41; -+pub const NID_sha1: c_int = 64; -+pub const NID_dsaWithSHA1_2: c_int = 70; -+pub const NID_sha1WithRSA: c_int = 115; -+pub const NID_ripemd160: c_int = 117; -+pub const NID_ripemd160WithRSA: c_int = 119; -+pub const NID_sxnet: c_int = 143; -+pub const NID_X500: c_int = 11; -+pub const NID_X509: c_int = 12; -+pub const NID_commonName: c_int = 13; -+pub const NID_surname: c_int = 100; -+pub const NID_serialNumber: c_int = 105; -+pub const NID_countryName: c_int = 14; -+pub const NID_localityName: c_int = 15; -+pub const NID_stateOrProvinceName: c_int = 16; -+pub const NID_streetAddress: c_int = 660; -+pub const NID_organizationName: c_int = 17; -+pub const NID_organizationalUnitName: c_int = 18; -+pub const NID_title: c_int = 106; -+pub const NID_description: c_int = 107; -+pub const NID_searchGuide: c_int = 859; -+pub const NID_businessCategory: c_int = 860; -+pub const NID_postalAddress: c_int = 861; -+pub const NID_postalCode: c_int = 661; -+pub const NID_postOfficeBox: c_int = 862; -+pub const NID_physicalDeliveryOfficeName: c_int = 863; -+pub const NID_telephoneNumber: c_int = 864; -+pub const NID_telexNumber: c_int = 865; -+pub const NID_teletexTerminalIdentifier: c_int = 866; -+pub const NID_facsimileTelephoneNumber: c_int = 867; -+pub const NID_x121Address: c_int = 868; -+pub const NID_internationaliSDNNumber: c_int = 869; -+pub const NID_registeredAddress: c_int = 870; -+pub const NID_destinationIndicator: c_int = 871; -+pub const NID_preferredDeliveryMethod: c_int = 872; -+pub const NID_presentationAddress: c_int = 873; -+pub const NID_supportedApplicationContext: c_int = 874; -+pub const NID_member: c_int = 875; -+pub const NID_owner: c_int = 876; -+pub const NID_roleOccupant: c_int = 877; -+pub const NID_seeAlso: c_int = 878; -+pub const NID_userPassword: c_int = 879; -+pub const NID_userCertificate: c_int = 880; -+pub const NID_cACertificate: c_int = 881; -+pub const NID_authorityRevocationList: c_int = 882; -+pub const NID_certificateRevocationList: c_int = 883; -+pub const NID_crossCertificatePair: c_int = 884; -+pub const NID_name: c_int = 173; -+pub const NID_givenName: c_int = 99; -+pub const NID_initials: c_int = 101; -+pub const NID_generationQualifier: c_int = 509; -+pub const NID_x500UniqueIdentifier: c_int = 503; -+pub const NID_dnQualifier: c_int = 174; -+pub const NID_enhancedSearchGuide: c_int = 885; -+pub const NID_protocolInformation: c_int = 886; -+pub const NID_distinguishedName: c_int = 887; -+pub const NID_uniqueMember: c_int = 888; -+pub const NID_houseIdentifier: c_int = 889; -+pub const NID_supportedAlgorithms: c_int = 890; -+pub const NID_deltaRevocationList: c_int = 891; -+pub const NID_dmdName: c_int = 892; -+pub const NID_pseudonym: c_int = 510; -+pub const NID_role: c_int = 400; -+pub const NID_X500algorithms: c_int = 378; -+pub const NID_rsa: c_int = 19; -+pub const NID_mdc2WithRSA: c_int = 96; -+pub const NID_mdc2: c_int = 95; -+pub const NID_id_ce: c_int = 81; -+pub const NID_subject_directory_attributes: c_int = 769; -+pub const NID_subject_key_identifier: c_int = 82; -+pub const NID_key_usage: c_int = 83; -+pub const NID_private_key_usage_period: c_int = 84; -+pub const NID_subject_alt_name: c_int = 85; -+pub const NID_issuer_alt_name: c_int = 86; -+pub const NID_basic_constraints: c_int = 87; -+pub const NID_crl_number: c_int = 88; -+pub const NID_crl_reason: c_int = 141; -+pub const NID_invalidity_date: c_int = 142; -+pub const NID_delta_crl: c_int = 140; -+pub const NID_issuing_distribution_point: c_int = 770; -+pub const NID_certificate_issuer: c_int = 771; -+pub const NID_name_constraints: c_int = 666; -+pub const NID_crl_distribution_points: c_int = 103; -+pub const NID_certificate_policies: c_int = 89; -+pub const NID_any_policy: c_int = 746; -+pub const NID_policy_mappings: c_int = 747; -+pub const NID_authority_key_identifier: c_int = 90; -+pub const NID_policy_constraints: c_int = 401; -+pub const NID_ext_key_usage: c_int = 126; -+pub const NID_freshest_crl: c_int = 857; -+pub const NID_inhibit_any_policy: c_int = 748; -+pub const NID_target_information: c_int = 402; -+pub const NID_no_rev_avail: c_int = 403; -+pub const NID_anyExtendedKeyUsage: c_int = 910; -+pub const NID_netscape: c_int = 57; -+pub const NID_netscape_cert_extension: c_int = 58; -+pub const NID_netscape_data_type: c_int = 59; -+pub const NID_netscape_cert_type: c_int = 71; -+pub const NID_netscape_base_url: c_int = 72; -+pub const NID_netscape_revocation_url: c_int = 73; -+pub const NID_netscape_ca_revocation_url: c_int = 74; -+pub const NID_netscape_renewal_url: c_int = 75; -+pub const NID_netscape_ca_policy_url: c_int = 76; -+pub const NID_netscape_ssl_server_name: c_int = 77; -+pub const NID_netscape_comment: c_int = 78; -+pub const NID_netscape_cert_sequence: c_int = 79; -+pub const NID_ns_sgc: c_int = 139; -+pub const NID_org: c_int = 379; -+pub const NID_dod: c_int = 380; -+pub const NID_iana: c_int = 381; -+pub const NID_Directory: c_int = 382; -+pub const NID_Management: c_int = 383; -+pub const NID_Experimental: c_int = 384; -+pub const NID_Private: c_int = 385; -+pub const NID_Security: c_int = 386; -+pub const NID_SNMPv2: c_int = 387; -+pub const NID_Mail: c_int = 388; -+pub const NID_Enterprises: c_int = 389; -+pub const NID_dcObject: c_int = 390; -+pub const NID_mime_mhs: c_int = 504; -+pub const NID_mime_mhs_headings: c_int = 505; -+pub const NID_mime_mhs_bodies: c_int = 506; -+pub const NID_id_hex_partial_message: c_int = 507; -+pub const NID_id_hex_multipart_message: c_int = 508; -+pub const NID_zlib_compression: c_int = 125; -+pub const NID_aes_128_ecb: c_int = 418; -+pub const NID_aes_128_cbc: c_int = 419; -+pub const NID_aes_128_ofb128: c_int = 420; -+pub const NID_aes_128_cfb128: c_int = 421; -+pub const NID_id_aes128_wrap: c_int = 788; -+pub const NID_aes_128_gcm: c_int = 895; -+pub const NID_aes_128_ccm: c_int = 896; -+pub const NID_id_aes128_wrap_pad: c_int = 897; -+pub const NID_aes_192_ecb: c_int = 422; -+pub const NID_aes_192_cbc: c_int = 423; -+pub const NID_aes_192_ofb128: c_int = 424; -+pub const NID_aes_192_cfb128: c_int = 425; -+pub const NID_id_aes192_wrap: c_int = 789; -+pub const NID_aes_192_gcm: c_int = 898; -+pub const NID_aes_192_ccm: c_int = 899; -+pub const NID_id_aes192_wrap_pad: c_int = 900; -+pub const NID_aes_256_ecb: c_int = 426; -+pub const NID_aes_256_cbc: c_int = 427; -+pub const NID_aes_256_ofb128: c_int = 428; -+pub const NID_aes_256_cfb128: c_int = 429; -+pub const NID_id_aes256_wrap: c_int = 790; -+pub const NID_aes_256_gcm: c_int = 901; -+pub const NID_aes_256_ccm: c_int = 902; -+pub const NID_id_aes256_wrap_pad: c_int = 903; -+pub const NID_aes_128_cfb1: c_int = 650; -+pub const NID_aes_192_cfb1: c_int = 651; -+pub const NID_aes_256_cfb1: c_int = 652; -+pub const NID_aes_128_cfb8: c_int = 653; -+pub const NID_aes_192_cfb8: c_int = 654; -+pub const NID_aes_256_cfb8: c_int = 655; -+pub const NID_aes_128_ctr: c_int = 904; -+pub const NID_aes_192_ctr: c_int = 905; -+pub const NID_aes_256_ctr: c_int = 906; -+pub const NID_aes_128_xts: c_int = 913; -+pub const NID_aes_256_xts: c_int = 914; -+pub const NID_des_cfb1: c_int = 656; -+pub const NID_des_cfb8: c_int = 657; -+pub const NID_des_ede3_cfb1: c_int = 658; -+pub const NID_des_ede3_cfb8: c_int = 659; -+pub const NID_sha256: c_int = 672; -+pub const NID_sha384: c_int = 673; -+pub const NID_sha512: c_int = 674; -+pub const NID_sha224: c_int = 675; -+pub const NID_dsa_with_SHA224: c_int = 802; -+pub const NID_dsa_with_SHA256: c_int = 803; -+pub const NID_hold_instruction_code: c_int = 430; -+pub const NID_hold_instruction_none: c_int = 431; -+pub const NID_hold_instruction_call_issuer: c_int = 432; -+pub const NID_hold_instruction_reject: c_int = 433; -+pub const NID_data: c_int = 434; -+pub const NID_pss: c_int = 435; -+pub const NID_ucl: c_int = 436; -+pub const NID_pilot: c_int = 437; -+pub const NID_pilotAttributeType: c_int = 438; -+pub const NID_pilotAttributeSyntax: c_int = 439; -+pub const NID_pilotObjectClass: c_int = 440; -+pub const NID_pilotGroups: c_int = 441; -+pub const NID_iA5StringSyntax: c_int = 442; -+pub const NID_caseIgnoreIA5StringSyntax: c_int = 443; -+pub const NID_pilotObject: c_int = 444; -+pub const NID_pilotPerson: c_int = 445; -+pub const NID_account: c_int = 446; -+pub const NID_document: c_int = 447; -+pub const NID_room: c_int = 448; -+pub const NID_documentSeries: c_int = 449; -+pub const NID_Domain: c_int = 392; -+pub const NID_rFC822localPart: c_int = 450; -+pub const NID_dNSDomain: c_int = 451; -+pub const NID_domainRelatedObject: c_int = 452; -+pub const NID_friendlyCountry: c_int = 453; -+pub const NID_simpleSecurityObject: c_int = 454; -+pub const NID_pilotOrganization: c_int = 455; -+pub const NID_pilotDSA: c_int = 456; -+pub const NID_qualityLabelledData: c_int = 457; -+pub const NID_userId: c_int = 458; -+pub const NID_textEncodedORAddress: c_int = 459; -+pub const NID_rfc822Mailbox: c_int = 460; -+pub const NID_info: c_int = 461; -+pub const NID_favouriteDrink: c_int = 462; -+pub const NID_roomNumber: c_int = 463; -+pub const NID_photo: c_int = 464; -+pub const NID_userClass: c_int = 465; -+pub const NID_host: c_int = 466; -+pub const NID_manager: c_int = 467; -+pub const NID_documentIdentifier: c_int = 468; -+pub const NID_documentTitle: c_int = 469; -+pub const NID_documentVersion: c_int = 470; -+pub const NID_documentAuthor: c_int = 471; -+pub const NID_documentLocation: c_int = 472; -+pub const NID_homeTelephoneNumber: c_int = 473; -+pub const NID_secretary: c_int = 474; -+pub const NID_otherMailbox: c_int = 475; -+pub const NID_lastModifiedTime: c_int = 476; -+pub const NID_lastModifiedBy: c_int = 477; -+pub const NID_domainComponent: c_int = 391; -+pub const NID_aRecord: c_int = 478; -+pub const NID_pilotAttributeType27: c_int = 479; -+pub const NID_mXRecord: c_int = 480; -+pub const NID_nSRecord: c_int = 481; -+pub const NID_sOARecord: c_int = 482; -+pub const NID_cNAMERecord: c_int = 483; -+pub const NID_associatedDomain: c_int = 484; -+pub const NID_associatedName: c_int = 485; -+pub const NID_homePostalAddress: c_int = 486; -+pub const NID_personalTitle: c_int = 487; -+pub const NID_mobileTelephoneNumber: c_int = 488; -+pub const NID_pagerTelephoneNumber: c_int = 489; -+pub const NID_friendlyCountryName: c_int = 490; -+pub const NID_organizationalStatus: c_int = 491; -+pub const NID_janetMailbox: c_int = 492; -+pub const NID_mailPreferenceOption: c_int = 493; -+pub const NID_buildingName: c_int = 494; -+pub const NID_dSAQuality: c_int = 495; -+pub const NID_singleLevelQuality: c_int = 496; -+pub const NID_subtreeMinimumQuality: c_int = 497; -+pub const NID_subtreeMaximumQuality: c_int = 498; -+pub const NID_personalSignature: c_int = 499; -+pub const NID_dITRedirect: c_int = 500; -+pub const NID_audio: c_int = 501; -+pub const NID_documentPublisher: c_int = 502; -+pub const NID_id_set: c_int = 512; -+pub const NID_set_ctype: c_int = 513; -+pub const NID_set_msgExt: c_int = 514; -+pub const NID_set_attr: c_int = 515; -+pub const NID_set_policy: c_int = 516; -+pub const NID_set_certExt: c_int = 517; -+pub const NID_set_brand: c_int = 518; -+pub const NID_setct_PANData: c_int = 519; -+pub const NID_setct_PANToken: c_int = 520; -+pub const NID_setct_PANOnly: c_int = 521; -+pub const NID_setct_OIData: c_int = 522; -+pub const NID_setct_PI: c_int = 523; -+pub const NID_setct_PIData: c_int = 524; -+pub const NID_setct_PIDataUnsigned: c_int = 525; -+pub const NID_setct_HODInput: c_int = 526; -+pub const NID_setct_AuthResBaggage: c_int = 527; -+pub const NID_setct_AuthRevReqBaggage: c_int = 528; -+pub const NID_setct_AuthRevResBaggage: c_int = 529; -+pub const NID_setct_CapTokenSeq: c_int = 530; -+pub const NID_setct_PInitResData: c_int = 531; -+pub const NID_setct_PI_TBS: c_int = 532; -+pub const NID_setct_PResData: c_int = 533; -+pub const NID_setct_AuthReqTBS: c_int = 534; -+pub const NID_setct_AuthResTBS: c_int = 535; -+pub const NID_setct_AuthResTBSX: c_int = 536; -+pub const NID_setct_AuthTokenTBS: c_int = 537; -+pub const NID_setct_CapTokenData: c_int = 538; -+pub const NID_setct_CapTokenTBS: c_int = 539; -+pub const NID_setct_AcqCardCodeMsg: c_int = 540; -+pub const NID_setct_AuthRevReqTBS: c_int = 541; -+pub const NID_setct_AuthRevResData: c_int = 542; -+pub const NID_setct_AuthRevResTBS: c_int = 543; -+pub const NID_setct_CapReqTBS: c_int = 544; -+pub const NID_setct_CapReqTBSX: c_int = 545; -+pub const NID_setct_CapResData: c_int = 546; -+pub const NID_setct_CapRevReqTBS: c_int = 547; -+pub const NID_setct_CapRevReqTBSX: c_int = 548; -+pub const NID_setct_CapRevResData: c_int = 549; -+pub const NID_setct_CredReqTBS: c_int = 550; -+pub const NID_setct_CredReqTBSX: c_int = 551; -+pub const NID_setct_CredResData: c_int = 552; -+pub const NID_setct_CredRevReqTBS: c_int = 553; -+pub const NID_setct_CredRevReqTBSX: c_int = 554; -+pub const NID_setct_CredRevResData: c_int = 555; -+pub const NID_setct_PCertReqData: c_int = 556; -+pub const NID_setct_PCertResTBS: c_int = 557; -+pub const NID_setct_BatchAdminReqData: c_int = 558; -+pub const NID_setct_BatchAdminResData: c_int = 559; -+pub const NID_setct_CardCInitResTBS: c_int = 560; -+pub const NID_setct_MeAqCInitResTBS: c_int = 561; -+pub const NID_setct_RegFormResTBS: c_int = 562; -+pub const NID_setct_CertReqData: c_int = 563; -+pub const NID_setct_CertReqTBS: c_int = 564; -+pub const NID_setct_CertResData: c_int = 565; -+pub const NID_setct_CertInqReqTBS: c_int = 566; -+pub const NID_setct_ErrorTBS: c_int = 567; -+pub const NID_setct_PIDualSignedTBE: c_int = 568; -+pub const NID_setct_PIUnsignedTBE: c_int = 569; -+pub const NID_setct_AuthReqTBE: c_int = 570; -+pub const NID_setct_AuthResTBE: c_int = 571; -+pub const NID_setct_AuthResTBEX: c_int = 572; -+pub const NID_setct_AuthTokenTBE: c_int = 573; -+pub const NID_setct_CapTokenTBE: c_int = 574; -+pub const NID_setct_CapTokenTBEX: c_int = 575; -+pub const NID_setct_AcqCardCodeMsgTBE: c_int = 576; -+pub const NID_setct_AuthRevReqTBE: c_int = 577; -+pub const NID_setct_AuthRevResTBE: c_int = 578; -+pub const NID_setct_AuthRevResTBEB: c_int = 579; -+pub const NID_setct_CapReqTBE: c_int = 580; -+pub const NID_setct_CapReqTBEX: c_int = 581; -+pub const NID_setct_CapResTBE: c_int = 582; -+pub const NID_setct_CapRevReqTBE: c_int = 583; -+pub const NID_setct_CapRevReqTBEX: c_int = 584; -+pub const NID_setct_CapRevResTBE: c_int = 585; -+pub const NID_setct_CredReqTBE: c_int = 586; -+pub const NID_setct_CredReqTBEX: c_int = 587; -+pub const NID_setct_CredResTBE: c_int = 588; -+pub const NID_setct_CredRevReqTBE: c_int = 589; -+pub const NID_setct_CredRevReqTBEX: c_int = 590; -+pub const NID_setct_CredRevResTBE: c_int = 591; -+pub const NID_setct_BatchAdminReqTBE: c_int = 592; -+pub const NID_setct_BatchAdminResTBE: c_int = 593; -+pub const NID_setct_RegFormReqTBE: c_int = 594; -+pub const NID_setct_CertReqTBE: c_int = 595; -+pub const NID_setct_CertReqTBEX: c_int = 596; -+pub const NID_setct_CertResTBE: c_int = 597; -+pub const NID_setct_CRLNotificationTBS: c_int = 598; -+pub const NID_setct_CRLNotificationResTBS: c_int = 599; -+pub const NID_setct_BCIDistributionTBS: c_int = 600; -+pub const NID_setext_genCrypt: c_int = 601; -+pub const NID_setext_miAuth: c_int = 602; -+pub const NID_setext_pinSecure: c_int = 603; -+pub const NID_setext_pinAny: c_int = 604; -+pub const NID_setext_track2: c_int = 605; -+pub const NID_setext_cv: c_int = 606; -+pub const NID_set_policy_root: c_int = 607; -+pub const NID_setCext_hashedRoot: c_int = 608; -+pub const NID_setCext_certType: c_int = 609; -+pub const NID_setCext_merchData: c_int = 610; -+pub const NID_setCext_cCertRequired: c_int = 611; -+pub const NID_setCext_tunneling: c_int = 612; -+pub const NID_setCext_setExt: c_int = 613; -+pub const NID_setCext_setQualf: c_int = 614; -+pub const NID_setCext_PGWYcapabilities: c_int = 615; -+pub const NID_setCext_TokenIdentifier: c_int = 616; -+pub const NID_setCext_Track2Data: c_int = 617; -+pub const NID_setCext_TokenType: c_int = 618; -+pub const NID_setCext_IssuerCapabilities: c_int = 619; -+pub const NID_setAttr_Cert: c_int = 620; -+pub const NID_setAttr_PGWYcap: c_int = 621; -+pub const NID_setAttr_TokenType: c_int = 622; -+pub const NID_setAttr_IssCap: c_int = 623; -+pub const NID_set_rootKeyThumb: c_int = 624; -+pub const NID_set_addPolicy: c_int = 625; -+pub const NID_setAttr_Token_EMV: c_int = 626; -+pub const NID_setAttr_Token_B0Prime: c_int = 627; -+pub const NID_setAttr_IssCap_CVM: c_int = 628; -+pub const NID_setAttr_IssCap_T2: c_int = 629; -+pub const NID_setAttr_IssCap_Sig: c_int = 630; -+pub const NID_setAttr_GenCryptgrm: c_int = 631; -+pub const NID_setAttr_T2Enc: c_int = 632; -+pub const NID_setAttr_T2cleartxt: c_int = 633; -+pub const NID_setAttr_TokICCsig: c_int = 634; -+pub const NID_setAttr_SecDevSig: c_int = 635; -+pub const NID_set_brand_IATA_ATA: c_int = 636; -+pub const NID_set_brand_Diners: c_int = 637; -+pub const NID_set_brand_AmericanExpress: c_int = 638; -+pub const NID_set_brand_JCB: c_int = 639; -+pub const NID_set_brand_Visa: c_int = 640; -+pub const NID_set_brand_MasterCard: c_int = 641; -+pub const NID_set_brand_Novus: c_int = 642; -+pub const NID_des_cdmf: c_int = 643; -+pub const NID_rsaOAEPEncryptionSET: c_int = 644; -+pub const NID_ipsec3: c_int = 749; -+pub const NID_ipsec4: c_int = 750; -+pub const NID_whirlpool: c_int = 804; -+pub const NID_cryptopro: c_int = 805; -+pub const NID_cryptocom: c_int = 806; -+pub const NID_id_GostR3411_94_with_GostR3410_2001: c_int = 807; -+pub const NID_id_GostR3411_94_with_GostR3410_94: c_int = 808; -+pub const NID_id_GostR3411_94: c_int = 809; -+pub const NID_id_HMACGostR3411_94: c_int = 810; -+pub const NID_id_GostR3410_2001: c_int = 811; -+pub const NID_id_GostR3410_94: c_int = 812; -+pub const NID_id_Gost28147_89: c_int = 813; -+pub const NID_gost89_cnt: c_int = 814; -+pub const NID_id_Gost28147_89_MAC: c_int = 815; -+pub const NID_id_GostR3411_94_prf: c_int = 816; -+pub const NID_id_GostR3410_2001DH: c_int = 817; -+pub const NID_id_GostR3410_94DH: c_int = 818; -+pub const NID_id_Gost28147_89_CryptoPro_KeyMeshing: c_int = 819; -+pub const NID_id_Gost28147_89_None_KeyMeshing: c_int = 820; -+pub const NID_id_GostR3411_94_TestParamSet: c_int = 821; -+pub const NID_id_GostR3411_94_CryptoProParamSet: c_int = 822; -+pub const NID_id_Gost28147_89_TestParamSet: c_int = 823; -+pub const NID_id_Gost28147_89_CryptoPro_A_ParamSet: c_int = 824; -+pub const NID_id_Gost28147_89_CryptoPro_B_ParamSet: c_int = 825; -+pub const NID_id_Gost28147_89_CryptoPro_C_ParamSet: c_int = 826; -+pub const NID_id_Gost28147_89_CryptoPro_D_ParamSet: c_int = 827; -+pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet: c_int = 828; -+pub const NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet: c_int = 829; -+pub const NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet: c_int = 830; -+pub const NID_id_GostR3410_94_TestParamSet: c_int = 831; -+pub const NID_id_GostR3410_94_CryptoPro_A_ParamSet: c_int = 832; -+pub const NID_id_GostR3410_94_CryptoPro_B_ParamSet: c_int = 833; -+pub const NID_id_GostR3410_94_CryptoPro_C_ParamSet: c_int = 834; -+pub const NID_id_GostR3410_94_CryptoPro_D_ParamSet: c_int = 835; -+pub const NID_id_GostR3410_94_CryptoPro_XchA_ParamSet: c_int = 836; -+pub const NID_id_GostR3410_94_CryptoPro_XchB_ParamSet: c_int = 837; -+pub const NID_id_GostR3410_94_CryptoPro_XchC_ParamSet: c_int = 838; -+pub const NID_id_GostR3410_2001_TestParamSet: c_int = 839; -+pub const NID_id_GostR3410_2001_CryptoPro_A_ParamSet: c_int = 840; -+pub const NID_id_GostR3410_2001_CryptoPro_B_ParamSet: c_int = 841; -+pub const NID_id_GostR3410_2001_CryptoPro_C_ParamSet: c_int = 842; -+pub const NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet: c_int = 843; -+pub const NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet: c_int = 844; -+pub const NID_id_GostR3410_94_a: c_int = 845; -+pub const NID_id_GostR3410_94_aBis: c_int = 846; -+pub const NID_id_GostR3410_94_b: c_int = 847; -+pub const NID_id_GostR3410_94_bBis: c_int = 848; -+pub const NID_id_Gost28147_89_cc: c_int = 849; -+pub const NID_id_GostR3410_94_cc: c_int = 850; -+pub const NID_id_GostR3410_2001_cc: c_int = 851; -+pub const NID_id_GostR3411_94_with_GostR3410_94_cc: c_int = 852; -+pub const NID_id_GostR3411_94_with_GostR3410_2001_cc: c_int = 853; -+pub const NID_id_GostR3410_2001_ParamSet_cc: c_int = 854; -+pub const NID_camellia_128_cbc: c_int = 751; -+pub const NID_camellia_192_cbc: c_int = 752; -+pub const NID_camellia_256_cbc: c_int = 753; -+pub const NID_id_camellia128_wrap: c_int = 907; -+pub const NID_id_camellia192_wrap: c_int = 908; -+pub const NID_id_camellia256_wrap: c_int = 909; -+pub const NID_camellia_128_ecb: c_int = 754; -+pub const NID_camellia_128_ofb128: c_int = 766; -+pub const NID_camellia_128_cfb128: c_int = 757; -+pub const NID_camellia_192_ecb: c_int = 755; -+pub const NID_camellia_192_ofb128: c_int = 767; -+pub const NID_camellia_192_cfb128: c_int = 758; -+pub const NID_camellia_256_ecb: c_int = 756; -+pub const NID_camellia_256_ofb128: c_int = 768; -+pub const NID_camellia_256_cfb128: c_int = 759; -+pub const NID_camellia_128_cfb1: c_int = 760; -+pub const NID_camellia_192_cfb1: c_int = 761; -+pub const NID_camellia_256_cfb1: c_int = 762; -+pub const NID_camellia_128_cfb8: c_int = 763; -+pub const NID_camellia_192_cfb8: c_int = 764; -+pub const NID_camellia_256_cfb8: c_int = 765; -+pub const NID_kisa: c_int = 773; -+pub const NID_seed_ecb: c_int = 776; -+pub const NID_seed_cbc: c_int = 777; -+pub const NID_seed_cfb128: c_int = 779; -+pub const NID_seed_ofb128: c_int = 778; -+pub const NID_hmac: c_int = 855; -+pub const NID_cmac: c_int = 894; -+pub const NID_rc4_hmac_md5: c_int = 915; -+pub const NID_aes_128_cbc_hmac_sha1: c_int = 916; -+pub const NID_aes_192_cbc_hmac_sha1: c_int = 917; -+pub const NID_aes_256_cbc_hmac_sha1: c_int = 918; Index: lang/rust/files/patch-src_vendor_openssl-sys_src_object.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_object.rs +++ /dev/null @@ -1,21 +0,0 @@ ---- src/vendor/openssl-sys/src/object.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/object.rs -@@ -0,0 +1,18 @@ -+use libc::*; -+ -+use *; -+ -+extern "C" { -+ pub fn OBJ_nid2ln(nid: c_int) -> *const c_char; -+ pub fn OBJ_nid2sn(nid: c_int) -> *const c_char; -+ pub fn OBJ_obj2nid(o: *const ASN1_OBJECT) -> c_int; -+ pub fn OBJ_obj2txt( -+ buf: *mut c_char, -+ buf_len: c_int, -+ a: *const ASN1_OBJECT, -+ no_name: c_int, -+ ) -> c_int; -+ -+ pub fn OBJ_find_sigid_algs(signid: c_int, pdig_nid: *mut c_int, ppkey_nid: *mut c_int) -+ -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_ocsp.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_ocsp.rs +++ /dev/null @@ -1,121 +0,0 @@ ---- src/vendor/openssl-sys/src/ocsp.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/ocsp.rs -@@ -0,0 +1,118 @@ -+use libc::*; -+ -+use *; -+ -+pub const OCSP_REVOKED_STATUS_NOSTATUS: c_int = -1; -+pub const OCSP_REVOKED_STATUS_UNSPECIFIED: c_int = 0; -+pub const OCSP_REVOKED_STATUS_KEYCOMPROMISE: c_int = 1; -+pub const OCSP_REVOKED_STATUS_CACOMPROMISE: c_int = 2; -+pub const OCSP_REVOKED_STATUS_AFFILIATIONCHANGED: c_int = 3; -+pub const OCSP_REVOKED_STATUS_SUPERSEDED: c_int = 4; -+pub const OCSP_REVOKED_STATUS_CESSATIONOFOPERATION: c_int = 5; -+pub const OCSP_REVOKED_STATUS_CERTIFICATEHOLD: c_int = 6; -+pub const OCSP_REVOKED_STATUS_REMOVEFROMCRL: c_int = 8; -+ -+pub const OCSP_NOCERTS: c_ulong = 0x1; -+pub const OCSP_NOINTERN: c_ulong = 0x2; -+pub const OCSP_NOSIGS: c_ulong = 0x4; -+pub const OCSP_NOCHAIN: c_ulong = 0x8; -+pub const OCSP_NOVERIFY: c_ulong = 0x10; -+pub const OCSP_NOEXPLICIT: c_ulong = 0x20; -+pub const OCSP_NOCASIGN: c_ulong = 0x40; -+pub const OCSP_NODELEGATED: c_ulong = 0x80; -+pub const OCSP_NOCHECKS: c_ulong = 0x100; -+pub const OCSP_TRUSTOTHER: c_ulong = 0x200; -+pub const OCSP_RESPID_KEY: c_ulong = 0x400; -+pub const OCSP_NOTIME: c_ulong = 0x800; -+ -+pub enum OCSP_CERTID {} -+ -+pub enum OCSP_ONEREQ {} -+ -+pub enum OCSP_REQUEST {} -+ -+pub const OCSP_RESPONSE_STATUS_SUCCESSFUL: c_int = 0; -+pub const OCSP_RESPONSE_STATUS_MALFORMEDREQUEST: c_int = 1; -+pub const OCSP_RESPONSE_STATUS_INTERNALERROR: c_int = 2; -+pub const OCSP_RESPONSE_STATUS_TRYLATER: c_int = 3; -+pub const OCSP_RESPONSE_STATUS_SIGREQUIRED: c_int = 5; -+pub const OCSP_RESPONSE_STATUS_UNAUTHORIZED: c_int = 6; -+ -+pub const V_OCSP_CERTSTATUS_GOOD: c_int = 0; -+pub const V_OCSP_CERTSTATUS_REVOKED: c_int = 1; -+pub const V_OCSP_CERTSTATUS_UNKNOWN: c_int = 2; -+ -+pub enum OCSP_BASICRESP {} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn OCSP_cert_to_id( -+ dgst: *const EVP_MD, -+ subject: *const X509, -+ issuer: *const X509, -+ ) -> *mut OCSP_CERTID; -+ } -+ } else { -+ extern "C" { -+ pub fn OCSP_cert_to_id( -+ dgst: *const EVP_MD, -+ subject: *mut X509, -+ issuer: *mut X509, -+ ) -> *mut ::OCSP_CERTID; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn OCSP_request_add0_id(r: *mut OCSP_REQUEST, id: *mut OCSP_CERTID) -> *mut OCSP_ONEREQ; -+ -+ pub fn OCSP_resp_find_status( -+ bs: *mut OCSP_BASICRESP, -+ id: *mut OCSP_CERTID, -+ status: *mut c_int, -+ reason: *mut c_int, -+ revtime: *mut *mut ASN1_GENERALIZEDTIME, -+ thisupd: *mut *mut ASN1_GENERALIZEDTIME, -+ nextupd: *mut *mut ASN1_GENERALIZEDTIME, -+ ) -> c_int; -+ pub fn OCSP_check_validity( -+ thisupd: *mut ASN1_GENERALIZEDTIME, -+ nextupd: *mut ASN1_GENERALIZEDTIME, -+ sec: c_long, -+ maxsec: c_long, -+ ) -> c_int; -+ -+ pub fn OCSP_response_status(resp: *mut OCSP_RESPONSE) -> c_int; -+ pub fn OCSP_response_get1_basic(resp: *mut OCSP_RESPONSE) -> *mut OCSP_BASICRESP; -+ -+ pub fn OCSP_response_create(status: c_int, bs: *mut OCSP_BASICRESP) -> *mut OCSP_RESPONSE; -+ -+ pub fn OCSP_BASICRESP_new() -> *mut OCSP_BASICRESP; -+ pub fn OCSP_BASICRESP_free(r: *mut OCSP_BASICRESP); -+ pub fn OCSP_RESPONSE_new() -> *mut OCSP_RESPONSE; -+ pub fn OCSP_RESPONSE_free(r: *mut OCSP_RESPONSE); -+ pub fn i2d_OCSP_RESPONSE(a: *mut OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int; -+ pub fn d2i_OCSP_RESPONSE( -+ a: *mut *mut OCSP_RESPONSE, -+ pp: *mut *const c_uchar, -+ length: c_long, -+ ) -> *mut OCSP_RESPONSE; -+ pub fn OCSP_ONEREQ_free(r: *mut OCSP_ONEREQ); -+ pub fn OCSP_CERTID_free(id: *mut OCSP_CERTID); -+ pub fn OCSP_REQUEST_new() -> *mut OCSP_REQUEST; -+ pub fn OCSP_REQUEST_free(r: *mut OCSP_REQUEST); -+ pub fn i2d_OCSP_REQUEST(a: *mut OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int; -+ pub fn d2i_OCSP_REQUEST( -+ a: *mut *mut OCSP_REQUEST, -+ pp: *mut *const c_uchar, -+ length: c_long, -+ ) -> *mut OCSP_REQUEST; -+ -+ pub fn OCSP_basic_verify( -+ bs: *mut OCSP_BASICRESP, -+ certs: *mut stack_st_X509, -+ st: *mut X509_STORE, -+ flags: c_ulong, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_mod.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_mod.rs +++ /dev/null @@ -1,86 +0,0 @@ ---- src/vendor/openssl-sys/src/openssl/mod.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/openssl/mod.rs -@@ -1,83 +0,0 @@ --use libc::{c_int, c_long, c_uchar, c_uint, c_ulong}; -- --#[cfg(not(ossl110))] --mod v10x; --#[cfg(not(ossl110))] --pub use openssl::v10x::*; -- --#[cfg(ossl110)] --mod v110; --#[cfg(ossl110)] --pub use openssl::v110::*; -- --#[cfg(ossl111)] --mod v111; --#[cfg(ossl111)] --pub use openssl::v111::*; -- --#[cfg(ossl102)] --pub const SSL_CTRL_SET_VERIFY_CERT_STORE: c_int = 106; -- --pub const SSL_MODE_SEND_CLIENTHELLO_TIME: c_long = 0x20; --pub const SSL_MODE_SEND_SERVERHELLO_TIME: c_long = 0x40; --pub const SSL_MODE_SEND_FALLBACK_SCSV: c_long = 0x80; -- --pub const SSL_OP_SAFARI_ECDHE_ECDSA_BUG: c_ulong = 0x00000040; -- --pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x00008000; --pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x00020000; --pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x00040000; --pub const SSL_OP_NO_SSLv3: c_ulong = 0x02000000; --#[cfg(ossl102)] --pub const SSL_OP_NO_DTLSv1: c_ulong = 0x04000000; --#[cfg(ossl102)] --pub const SSL_OP_NO_DTLSv1_2: c_ulong = 0x08000000; -- --pub const X509_V_ERR_UNSPECIFIED: c_int = 1; -- --pub const CMS_TEXT: c_uint = 0x1; --pub const CMS_NOCERTS: c_uint = 0x2; --pub const CMS_NO_CONTENT_VERIFY: c_uint = 0x4; --pub const CMS_NO_ATTR_VERIFY: c_uint = 0x8; --pub const CMS_NOSIGS: c_uint = 0x4 | 0x8; --pub const CMS_NOINTERN: c_uint = 0x10; --pub const CMS_NO_SIGNER_CERT_VERIFY: c_uint = 0x20; --pub const CMS_NOVERIFY: c_uint = 0x20; --pub const CMS_DETACHED: c_uint = 0x40; --pub const CMS_BINARY: c_uint = 0x80; --pub const CMS_NOATTR: c_uint = 0x100; --pub const CMS_NOSMIMECAP: c_uint = 0x200; --pub const CMS_NOOLDMIMETYPE: c_uint = 0x400; --pub const CMS_CRLFEOL: c_uint = 0x800; --pub const CMS_STREAM: c_uint = 0x1000; --pub const CMS_NOCRL: c_uint = 0x2000; --pub const CMS_PARTIAL: c_uint = 0x4000; --pub const CMS_REUSE_DIGEST: c_uint = 0x8000; --pub const CMS_USE_KEYID: c_uint = 0x10000; --pub const CMS_DEBUG_DECRYPT: c_uint = 0x20000; --#[cfg(ossl102)] --pub const CMS_KEY_PARAM: c_uint = 0x40000; -- --extern "C" { -- pub fn CMS_decrypt( -- cms: *mut ::CMS_ContentInfo, -- pkey: *mut ::EVP_PKEY, -- cert: *mut ::X509, -- dcont: *mut ::BIO, -- out: *mut ::BIO, -- flags: c_uint, -- ) -> c_int; -- pub fn SMIME_read_CMS(bio: *mut ::BIO, bcont: *mut *mut ::BIO) -> *mut ::CMS_ContentInfo; -- pub fn CMS_ContentInfo_free(cms: *mut ::CMS_ContentInfo); -- 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; -- pub fn i2d_CMS_ContentInfo(a: *mut ::CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int; -- -- pub fn FIPS_mode_set(onoff: c_int) -> c_int; -- pub fn FIPS_mode() -> c_int; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v10x.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v10x.rs +++ /dev/null @@ -1,1008 +0,0 @@ ---- src/vendor/openssl-sys/src/openssl/v10x.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/openssl/v10x.rs -@@ -1,1005 +0,0 @@ --use std::io::{self, Write}; --use std::mem; --use std::process; --use std::ptr; --use std::sync::{Mutex, MutexGuard}; --use std::sync::{Once, ONCE_INIT}; -- --#[cfg(ossl102)] --use libc::time_t; --use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; -- --#[repr(C)] --pub struct stack_st_ASN1_OBJECT { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509 { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_NAME { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_ATTRIBUTE { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_X509_EXTENSION { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_GENERAL_NAME { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_void { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_SSL_CIPHER { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct stack_st_OPENSSL_STRING { -- pub stack: _STACK, --} -- --#[repr(C)] --pub struct _STACK { -- pub num: c_int, -- pub data: *mut *mut c_char, -- pub sorted: c_int, -- pub num_alloc: c_int, -- pub comp: Option c_int>, --} -- --#[repr(C)] --pub struct BIO_METHOD { -- pub type_: c_int, -- pub name: *const c_char, -- pub bwrite: Option c_int>, -- pub bread: Option c_int>, -- pub bputs: Option c_int>, -- pub bgets: Option c_int>, -- pub ctrl: Option c_long>, -- pub create: Option c_int>, -- pub destroy: Option c_int>, -- pub callback_ctrl: Option c_long>, --} -- --#[repr(C)] --pub struct RSA { -- pub pad: c_int, -- pub version: c_long, -- pub meth: *const ::RSA_METHOD, -- -- pub engine: *mut ::ENGINE, -- pub n: *mut ::BIGNUM, -- pub e: *mut ::BIGNUM, -- pub d: *mut ::BIGNUM, -- pub p: *mut ::BIGNUM, -- pub q: *mut ::BIGNUM, -- pub dmp1: *mut ::BIGNUM, -- pub dmq1: *mut ::BIGNUM, -- pub iqmp: *mut ::BIGNUM, -- -- pub ex_data: ::CRYPTO_EX_DATA, -- pub references: c_int, -- pub flags: c_int, -- -- pub _method_mod_n: *mut ::BN_MONT_CTX, -- pub _method_mod_p: *mut ::BN_MONT_CTX, -- pub _method_mod_q: *mut ::BN_MONT_CTX, -- -- pub bignum_data: *mut c_char, -- pub blinding: *mut ::BN_BLINDING, -- pub mt_blinding: *mut ::BN_BLINDING, --} -- --#[repr(C)] --pub struct DSA { -- pub pad: c_int, -- pub version: c_long, -- pub write_params: c_int, -- -- pub p: *mut ::BIGNUM, -- pub q: *mut ::BIGNUM, -- pub g: *mut ::BIGNUM, -- pub pub_key: *mut ::BIGNUM, -- pub priv_key: *mut ::BIGNUM, -- pub kinv: *mut ::BIGNUM, -- pub r: *mut ::BIGNUM, -- -- pub flags: c_int, -- pub method_mont_p: *mut ::BN_MONT_CTX, -- pub references: c_int, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub meth: *const ::DSA_METHOD, -- pub engine: *mut ::ENGINE, --} -- --#[repr(C)] --pub struct ECDSA_SIG { -- pub r: *mut BIGNUM, -- pub s: *mut BIGNUM, --} -- --#[repr(C)] --pub struct EVP_PKEY { -- pub type_: c_int, -- pub save_type: c_int, -- pub references: c_int, -- pub ameth: *const ::EVP_PKEY_ASN1_METHOD, -- pub engine: *mut ::ENGINE, -- pub pkey: *mut c_void, -- pub save_parameters: c_int, -- pub attributes: *mut stack_st_X509_ATTRIBUTE, --} -- --#[repr(C)] --pub struct BIO { -- pub method: *mut ::BIO_METHOD, -- pub callback: Option< -- unsafe extern "C" fn(*mut ::BIO, c_int, *const c_char, c_int, c_long, c_long) -> c_long, -- >, -- pub cb_arg: *mut c_char, -- pub init: c_int, -- pub shutdown: c_int, -- pub flags: c_int, -- pub retry_reason: c_int, -- pub num: c_int, -- pub ptr: *mut c_void, -- pub next_bio: *mut ::BIO, -- pub prev_bio: *mut ::BIO, -- pub references: c_int, -- pub num_read: c_ulong, -- pub num_write: c_ulong, -- pub ex_data: ::CRYPTO_EX_DATA, --} -- --#[repr(C)] --pub struct CRYPTO_EX_DATA { -- pub sk: *mut ::stack_st_void, -- pub dummy: c_int, --} -- --#[repr(C)] --pub struct EVP_MD_CTX { -- digest: *mut ::EVP_MD, -- engine: *mut ::ENGINE, -- flags: c_ulong, -- md_data: *mut c_void, -- pctx: *mut ::EVP_PKEY_CTX, -- update: *mut c_void, --} -- --#[repr(C)] --pub struct EVP_CIPHER { -- pub nid: c_int, -- pub block_size: c_int, -- pub key_len: c_int, -- pub iv_len: c_int, -- pub flags: c_ulong, -- pub init: Option< -- unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *const c_uchar, *const c_uchar, c_int) -> c_int, -- >, -- pub do_cipher: Option< -- unsafe extern "C" fn(*mut ::EVP_CIPHER_CTX, *mut c_uchar, *const c_uchar, size_t) -> c_int, -- >, -- pub cleanup: Option c_int>, -- pub ctx_size: c_int, -- pub set_asn1_parameters: -- Option c_int>, -- pub get_asn1_parameters: -- Option c_int>, -- pub ctrl: -- Option c_int>, -- pub app_data: *mut c_void, --} -- --#[repr(C)] --pub struct HMAC_CTX { -- md: *mut ::EVP_MD, -- md_ctx: ::EVP_MD_CTX, -- i_ctx: ::EVP_MD_CTX, -- o_ctx: ::EVP_MD_CTX, -- key_length: c_uint, -- key: [c_uchar; 128], --} -- --#[repr(C)] --pub struct BIGNUM { -- pub d: *mut ::BN_ULONG, -- pub top: c_int, -- pub dmax: c_int, -- pub neg: c_int, -- pub flags: c_int, --} -- --#[repr(C)] --pub struct DH { -- pub pad: c_int, -- pub version: c_int, -- pub p: *mut ::BIGNUM, -- pub g: *mut ::BIGNUM, -- pub length: c_long, -- pub pub_key: *mut ::BIGNUM, -- pub priv_key: *mut ::BIGNUM, -- pub flags: c_int, -- pub method_mont_p: *mut ::BN_MONT_CTX, -- pub q: *mut ::BIGNUM, -- pub j: *mut ::BIGNUM, -- pub seed: *mut c_uchar, -- pub seedlen: c_int, -- pub counter: *mut ::BIGNUM, -- pub references: c_int, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub meth: *const ::DH_METHOD, -- pub engine: *mut ::ENGINE, --} -- --#[repr(C)] --pub struct X509 { -- pub cert_info: *mut X509_CINF, -- pub sig_alg: *mut ::X509_ALGOR, -- pub signature: *mut ::ASN1_BIT_STRING, -- pub valid: c_int, -- pub references: c_int, -- pub name: *mut c_char, -- pub ex_data: ::CRYPTO_EX_DATA, -- pub ex_pathlen: c_long, -- pub ex_pcpathlen: c_long, -- pub ex_flags: c_ulong, -- pub ex_kusage: c_ulong, -- pub ex_xkusage: c_ulong, -- pub ex_nscert: c_ulong, -- skid: *mut c_void, -- akid: *mut c_void, -- policy_cache: *mut c_void, -- crldp: *mut c_void, -- altname: *mut c_void, -- nc: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))] -- rfc3779_addr: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))] -- rfc3779_asid: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_SHA"))] -- sha1_hash: [c_uchar; 20], -- aux: *mut c_void, --} -- --#[repr(C)] --pub struct X509_CINF { -- version: *mut c_void, -- serialNumber: *mut c_void, -- signature: *mut c_void, -- issuer: *mut c_void, -- pub validity: *mut X509_VAL, -- subject: *mut c_void, -- key: *mut c_void, -- issuerUID: *mut c_void, -- subjectUID: *mut c_void, -- pub extensions: *mut stack_st_X509_EXTENSION, -- enc: ASN1_ENCODING, --} -- --#[repr(C)] --pub struct X509_ALGOR { -- pub algorithm: *mut ::ASN1_OBJECT, -- parameter: *mut c_void, --} -- --#[repr(C)] --pub struct ASN1_ENCODING { -- pub enc: *mut c_uchar, -- pub len: c_long, -- pub modified: c_int, --} -- --#[repr(C)] --pub struct X509_VAL { -- pub notBefore: *mut ::ASN1_TIME, -- pub notAfter: *mut ::ASN1_TIME, --} -- --#[repr(C)] --pub struct X509_REQ_INFO { -- pub enc: ASN1_ENCODING, -- pub version: *mut ::ASN1_INTEGER, -- pub subject: *mut ::X509_NAME, -- pubkey: *mut c_void, -- pub attributes: *mut stack_st_X509_ATTRIBUTE, --} -- --#[repr(C)] --pub struct X509_REQ { -- pub req_info: *mut X509_REQ_INFO, -- sig_alg: *mut c_void, -- signature: *mut c_void, -- references: c_int, --} -- --#[repr(C)] --pub struct SSL { -- version: c_int, -- type_: c_int, -- method: *const ::SSL_METHOD, -- rbio: *mut c_void, -- wbio: *mut c_void, -- bbio: *mut c_void, -- rwstate: c_int, -- in_handshake: c_int, -- handshake_func: Option c_int>, -- pub server: c_int, -- new_session: c_int, -- quiet_session: c_int, -- shutdown: c_int, -- state: c_int, -- rstate: c_int, -- init_buf: *mut c_void, -- init_msg: *mut c_void, -- init_num: c_int, -- init_off: c_int, -- packet: *mut c_uchar, -- packet_length: c_uint, -- s2: *mut c_void, -- s3: *mut c_void, -- d1: *mut c_void, -- read_ahead: c_int, -- msg_callback: Option< -- unsafe extern "C" fn(c_int, c_int, c_int, *const c_void, size_t, *mut SSL, *mut c_void), -- >, -- msg_callback_arg: *mut c_void, -- hit: c_int, -- param: *mut c_void, -- cipher_list: *mut stack_st_SSL_CIPHER, -- cipher_list_by_id: *mut stack_st_SSL_CIPHER, -- mac_flags: c_int, -- enc_read_ctx: *mut ::EVP_CIPHER_CTX, -- read_hash: *mut ::EVP_MD_CTX, -- expand: *mut c_void, -- enc_write_ctx: *mut ::EVP_CIPHER_CTX, -- write_hash: *mut ::EVP_MD_CTX, -- compress: *mut c_void, -- cert: *mut c_void, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -- session: *mut ::SSL_SESSION, -- generate_session_id: ::GEN_SESSION_CB, -- verify_mode: c_int, -- verify_callback: Option c_int>, -- info_callback: Option, -- error: c_int, -- error_code: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -- kssl_ctx: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_client_callback: Option< -- unsafe extern "C" fn(*mut SSL, *const c_char, *mut c_char, c_uint, *mut c_uchar, c_uint) -- -> c_uint, -- >, -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_server_callback: -- Option c_uint>, -- ctx: *mut ::SSL_CTX, -- debug: c_int, -- verify_result: c_long, -- ex_data: ::CRYPTO_EX_DATA, -- client_CA: *mut stack_st_X509_NAME, -- references: c_int, -- options: c_ulong, -- mode: c_ulong, -- max_cert_list: c_long, -- first_packet: c_int, -- client_version: c_int, -- max_send_fragment: c_uint, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_debug_cb: -- Option, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_debug_arg: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_hostname: *mut c_char, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- servername_done: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_status_type: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_status_expected: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ocsp_ids: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ocsp_exts: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ocsp_resp: *mut c_uchar, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ocsp_resplen: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ticket_expected: c_int, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ecpointformatlist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ecpointformatlist: *mut c_uchar, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ellipticcurvelist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ellipticcurvelist: *mut c_uchar, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_opaque_prf_input: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_opaque_prf_input_len: size_t, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_session_ticket: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tls_session_ticket_ext_cb_arg: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tls_session_secret_cb: ::tls_session_secret_cb_fn, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tls_session_secret_cb_arg: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- initial_ctx: *mut ::SSL_CTX, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_proto_negotiated: *mut c_uchar, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_proto_negotiated_len: c_uchar, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- srtp_profiles: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- srtp_profile: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_heartbeat: c_uint, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_hb_pending: c_uint, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_hb_seq: c_uint, -- renegotiate: c_int, -- #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -- srp_ctx: ::SRP_CTX, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_client_proto_list: *mut c_uchar, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_client_proto_list_len: c_uint, --} -- --#[repr(C)] --pub struct SSL_CTX { -- method: *mut c_void, -- cipher_list: *mut c_void, -- cipher_list_by_id: *mut c_void, -- cert_store: *mut c_void, -- sessions: *mut c_void, -- session_cache_size: c_ulong, -- session_cache_head: *mut c_void, -- session_cache_tail: *mut c_void, -- session_cache_mode: c_int, -- session_timeout: c_long, -- new_session_cb: *mut c_void, -- remove_session_cb: *mut c_void, -- get_session_cb: *mut c_void, -- stats: [c_int; 11], -- pub references: c_int, -- app_verify_callback: *mut c_void, -- app_verify_arg: *mut c_void, -- default_passwd_callback: *mut c_void, -- default_passwd_callback_userdata: *mut c_void, -- client_cert_cb: *mut c_void, -- app_gen_cookie_cb: *mut c_void, -- app_verify_cookie_cb: *mut c_void, -- ex_dat: ::CRYPTO_EX_DATA, -- rsa_md5: *mut c_void, -- md5: *mut c_void, -- sha1: *mut c_void, -- extra_certs: *mut c_void, -- comp_methods: *mut c_void, -- info_callback: *mut c_void, -- client_CA: *mut c_void, -- options: c_ulong, -- mode: c_ulong, -- max_cert_list: c_long, -- cert: *mut c_void, -- read_ahead: c_int, -- msg_callback: *mut c_void, -- msg_callback_arg: *mut c_void, -- verify_mode: c_int, -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; 32], -- default_verify_callback: *mut c_void, -- generate_session_id: *mut c_void, -- param: *mut c_void, -- quiet_shutdown: c_int, -- max_send_fragment: c_uint, -- -- #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))] -- client_cert_engine: *mut c_void, -- -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_servername_callback: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsect_servername_arg: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_tick_key_name: [c_uchar; 16], -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_tick_hmac_key: [c_uchar; 16], -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_tick_aes_key: [c_uchar; 16], -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ticket_key_cb: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_status_cb: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_status_arg: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_opaque_prf_input_callback: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_opaque_prf_input_callback_arg: *mut c_void, -- -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_identity_hint: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_client_callback: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_server_callback: *mut c_void, -- -- #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -- freelist_max_len: c_uint, -- #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -- wbuf_freelist: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -- rbuf_freelist: *mut c_void, -- -- #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -- srp_ctx: SRP_CTX, -- -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_protos_advertised_cb: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_protos_advertised_cb_arg: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_proto_select_cb: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_NEXTPROTONEG")))] -- next_proto_select_cb_arg: *mut c_void, -- -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl101))] -- srtp_profiles: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_select_cb: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_select_cb_arg: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_client_proto_list: *mut c_void, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -- alpn_client_proto_list_len: c_uint, -- -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))] -- tlsext_ecpointformatlist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))] -- tlsext_ecpointformatlist: *mut c_uchar, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))] -- tlsext_ellipticcurvelist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC"), ossl102))] -- tlsext_ellipticcurvelist: *mut c_uchar, --} -- --#[repr(C)] --pub struct SSL_SESSION { -- ssl_version: c_int, -- key_arg_length: c_uint, -- key_arg: [c_uchar; SSL_MAX_KEY_ARG_LENGTH as usize], -- pub master_key_length: c_int, -- pub master_key: [c_uchar; 48], -- session_id_length: c_uint, -- session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -- sid_ctx_length: c_uint, -- sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize], -- #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -- krb5_client_princ_len: c_uint, -- #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -- krb5_client_princ: [c_uchar; SSL_MAX_KRB5_PRINCIPAL_LENGTH as usize], -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_identity_hint: *mut c_char, -- #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -- psk_identity: *mut c_char, -- not_resumable: c_int, -- sess_cert: *mut c_void, -- peer: *mut X509, -- verify_result: c_long, -- pub references: c_int, -- timeout: c_long, -- time: c_long, -- compress_meth: c_uint, -- cipher: *const c_void, -- cipher_id: c_ulong, -- ciphers: *mut c_void, -- ex_data: ::CRYPTO_EX_DATA, -- prev: *mut c_void, -- next: *mut c_void, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_hostname: *mut c_char, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ecpointformatlist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ecpointformatlist: *mut c_uchar, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ellipticcurvelist_length: size_t, -- #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), not(osslconf = "OPENSSL_NO_EC")))] -- tlsext_ellipticcurvelist: *mut c_uchar, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_tick: *mut c_uchar, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_ticklen: size_t, -- #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -- tlsext_tick_lifetime_hint: c_long, -- #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -- srp_username: *mut c_char, --} -- --#[repr(C)] --pub struct SRP_CTX { -- SRP_cb_arg: *mut c_void, -- TLS_ext_srp_username_callback: *mut c_void, -- SRP_verify_param_callback: *mut c_void, -- SRP_give_srp_client_pwd_callback: *mut c_void, -- login: *mut c_void, -- N: *mut c_void, -- g: *mut c_void, -- s: *mut c_void, -- B: *mut c_void, -- A: *mut c_void, -- a: *mut c_void, -- b: *mut c_void, -- v: *mut c_void, -- info: *mut c_void, -- stringth: c_int, -- srp_Mask: c_ulong, --} -- --#[repr(C)] --#[cfg(ossl102)] --pub struct X509_VERIFY_PARAM { -- pub name: *mut c_char, -- pub check_time: time_t, -- pub inh_flags: c_ulong, -- pub flags: c_ulong, -- pub purpose: c_int, -- pub trust: c_int, -- pub depth: c_int, -- pub policies: *mut stack_st_ASN1_OBJECT, -- pub id: *mut X509_VERIFY_PARAM_ID, --} -- --#[cfg(ossl102)] --pub enum X509_VERIFY_PARAM_ID {} --pub enum PKCS12 {} -- --pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8; --pub const SSL_CTRL_OPTIONS: c_int = 32; --pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; --#[cfg(ossl102)] --pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94; -- --pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000001; --pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000002; --pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000008; --pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000020; --pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000080; --pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000100; --pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000200; --pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000; --pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000; --pub const SSL_OP_NO_SSLv2: c_ulong = 0x01000000; -- --pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32; --pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32; --pub const SSL_MAX_KEY_ARG_LENGTH: c_int = 8; --pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48; --pub const SSL_MAX_KRB5_PRINCIPAL_LENGTH: c_int = 256; -- --pub const SSLEAY_VERSION: c_int = 0; --pub const SSLEAY_CFLAGS: c_int = 2; --pub const SSLEAY_BUILT_ON: c_int = 3; --pub const SSLEAY_PLATFORM: c_int = 4; --pub const SSLEAY_DIR: c_int = 5; -- --pub const CRYPTO_LOCK_X509: c_int = 3; --pub const CRYPTO_LOCK_SSL_CTX: c_int = 12; --pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14; -- --#[cfg(ossl102h)] --pub const X509_V_ERR_INVALID_CALL: c_int = 65; --#[cfg(ossl102h)] --pub const X509_V_ERR_STORE_LOOKUP: c_int = 66; --#[cfg(ossl102h)] --pub const X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: c_int = 67; -- --static mut MUTEXES: *mut Vec> = 0 as *mut Vec>; --static mut GUARDS: *mut Vec>> = -- 0 as *mut Vec>>; -- --unsafe extern "C" fn locking_function(mode: c_int, n: c_int, _file: *const c_char, _line: c_int) { -- let mutex = &(*MUTEXES)[n as usize]; -- -- if mode & ::CRYPTO_LOCK != 0 { -- (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); -- } else { -- if let None = (*GUARDS)[n as usize].take() { -- let _ = writeln!( -- io::stderr(), -- "BUG: rust-openssl lock {} already unlocked, aborting", -- n -- ); -- process::abort(); -- } -- } --} -- --pub fn init() { -- static INIT: Once = ONCE_INIT; -- -- INIT.call_once(|| unsafe { -- SSL_library_init(); -- SSL_load_error_strings(); -- OPENSSL_add_all_algorithms_noconf(); -- -- let num_locks = ::CRYPTO_num_locks(); -- let mut mutexes = Box::new(Vec::new()); -- for _ in 0..num_locks { -- mutexes.push(Mutex::new(())); -- } -- MUTEXES = mem::transmute(mutexes); -- let guards: Box>>> = -- Box::new((0..num_locks).map(|_| None).collect()); -- GUARDS = mem::transmute(guards); -- -- CRYPTO_set_locking_callback(locking_function); -- set_id_callback(); -- }) --} -- --#[cfg(unix)] --fn set_id_callback() { -- unsafe extern "C" fn thread_id() -> c_ulong { -- ::libc::pthread_self() as c_ulong -- } -- -- unsafe { -- CRYPTO_set_id_callback(thread_id); -- } --} -- --#[cfg(not(unix))] --fn set_id_callback() {} -- --// macros -- --#[cfg(ossl102)] --pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int { -- ::SSL_CTX_ctrl( -- ctx, -- SSL_CTRL_SET_ECDH_AUTO, -- onoff as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --#[cfg(ossl102)] --pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int { -- ::SSL_ctrl( -- ssl, -- SSL_CTRL_SET_ECDH_AUTO, -- onoff as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int { -- ::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int --} -- --pub unsafe fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong { -- ::SSL_CTX_ctrl(ctx as *mut _, ::SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong --} -- --pub unsafe fn SSL_CTX_set_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong { -- ::SSL_CTX_ctrl( -- ctx as *mut _, -- ::SSL_CTRL_OPTIONS, -- op as c_long, -- ptr::null_mut(), -- ) as c_ulong --} -- --pub unsafe fn SSL_CTX_clear_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong { -- ::SSL_CTX_ctrl( -- ctx as *mut _, -- ::SSL_CTRL_CLEAR_OPTIONS, -- op as c_long, -- ptr::null_mut(), -- ) as c_ulong --} -- --extern "C" { -- pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO; -- pub fn BIO_s_file() -> *mut BIO_METHOD; -- pub fn BIO_s_mem() -> *mut BIO_METHOD; -- -- pub fn get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM; -- -- pub fn CRYPTO_malloc(num: c_int, file: *const c_char, line: c_int) -> *mut c_void; -- pub fn CRYPTO_free(buf: *mut c_void); -- pub fn CRYPTO_num_locks() -> c_int; -- pub fn CRYPTO_set_locking_callback( -- func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int), -- ); -- pub fn CRYPTO_set_id_callback(func: unsafe extern "C" fn() -> c_ulong); -- -- pub fn ERR_load_crypto_strings(); -- -- pub fn RSA_generate_key( -- modsz: c_int, -- e: c_ulong, -- cb: Option, -- cbarg: *mut c_void, -- ) -> *mut RSA; -- -- pub fn OCSP_cert_to_id( -- dgst: *const ::EVP_MD, -- subject: *mut ::X509, -- issuer: *mut ::X509, -- ) -> *mut ::OCSP_CERTID; -- -- pub fn PKCS12_create( -- pass: *mut c_char, -- friendly_name: *mut c_char, -- pkey: *mut EVP_PKEY, -- cert: *mut X509, -- ca: *mut stack_st_X509, -- nid_key: c_int, -- nid_cert: c_int, -- iter: c_int, -- mac_iter: c_int, -- keytype: c_int, -- ) -> *mut PKCS12; -- -- pub fn SSL_library_init() -> c_int; -- pub fn SSL_load_error_strings(); -- pub fn OPENSSL_add_all_algorithms_noconf(); -- pub fn HMAC_CTX_init(ctx: *mut ::HMAC_CTX); -- pub fn HMAC_CTX_cleanup(ctx: *mut ::HMAC_CTX); -- #[cfg(not(osslconf = "OPENSSL_NO_SSL3_METHOD"))] -- pub fn SSLv3_method() -> *const ::SSL_METHOD; -- pub fn TLSv1_method() -> *const ::SSL_METHOD; -- pub fn SSLv23_method() -> *const ::SSL_METHOD; -- pub fn TLSv1_1_method() -> *const ::SSL_METHOD; -- pub fn TLSv1_2_method() -> *const ::SSL_METHOD; -- pub fn DTLSv1_method() -> *const ::SSL_METHOD; -- #[cfg(ossl102)] -- pub fn DTLSv1_2_method() -> *const ::SSL_METHOD; -- pub fn SSL_get_ex_new_index( -- argl: c_long, -- argp: *mut c_void, -- new_func: Option<::CRYPTO_EX_new>, -- dup_func: Option<::CRYPTO_EX_dup>, -- free_func: Option<::CRYPTO_EX_free>, -- ) -> c_int; -- pub fn SSL_set_tmp_ecdh_callback( -- ssl: *mut ::SSL, -- ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int) -- -> *mut ::EC_KEY, -- ); -- pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *mut c_char; -- pub fn SSL_CTX_get_ex_new_index( -- argl: c_long, -- argp: *mut c_void, -- new_func: Option<::CRYPTO_EX_new>, -- dup_func: Option<::CRYPTO_EX_dup>, -- free_func: Option<::CRYPTO_EX_free>, -- ) -> c_int; -- // FIXME should take an option -- pub fn SSL_CTX_set_tmp_ecdh_callback( -- ctx: *mut ::SSL_CTX, -- ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int) -- -> *mut ::EC_KEY, -- ); -- pub fn SSL_CTX_sess_set_get_cb( -- ctx: *mut ::SSL_CTX, -- get_session_cb: Option< -- unsafe extern "C" fn(*mut ::SSL, *mut c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, -- >, -- ); -- pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME; -- pub fn X509_get_issuer_name(x: *mut ::X509) -> *mut ::X509_NAME; -- pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_get_ext_d2i( -- x: *mut ::X509, -- nid: c_int, -- crit: *mut c_int, -- idx: *mut c_int, -- ) -> *mut c_void; -- pub fn X509_NAME_add_entry_by_NID( -- x: *mut ::X509_NAME, -- field: c_int, -- ty: c_int, -- bytes: *mut c_uchar, -- len: c_int, -- loc: c_int, -- set: c_int, -- ) -> c_int; -- #[cfg(ossl102)] -- pub fn X509_get0_signature( -- psig: *mut *mut ::ASN1_BIT_STRING, -- palg: *mut *mut ::X509_ALGOR, -- x: *const ::X509, -- ); -- #[cfg(ossl102)] -- pub fn X509_get_signature_nid(x: *const X509) -> c_int; -- #[cfg(ossl102)] -- pub fn X509_ALGOR_get0( -- paobj: *mut *mut ::ASN1_OBJECT, -- pptype: *mut c_int, -- ppval: *mut *mut c_void, -- alg: *mut ::X509_ALGOR, -- ); -- pub fn X509_NAME_entry_count(n: *mut ::X509_NAME) -> c_int; -- pub fn X509_NAME_get_entry(n: *mut ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY; -- pub fn X509_NAME_ENTRY_get_data(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING; -- pub fn X509_NAME_ENTRY_get_object(ne: *mut ::X509_NAME_ENTRY) -> *mut ::ASN1_OBJECT; -- pub fn X509_STORE_CTX_get_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509; -- pub fn X509V3_EXT_nconf_nid( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- ext_nid: c_int, -- value: *mut c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn X509V3_EXT_nconf( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- name: *mut c_char, -- value: *mut c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *mut ::ASN1_STRING) -> c_int; -- pub fn ASN1_STRING_data(x: *mut ::ASN1_STRING) -> *mut c_uchar; -- pub fn CRYPTO_add_lock( -- pointer: *mut c_int, -- amount: c_int, -- type_: c_int, -- file: *const c_char, -- line: c_int, -- ) -> c_int; -- pub fn EVP_MD_CTX_create() -> *mut EVP_MD_CTX; -- pub fn EVP_MD_CTX_destroy(ctx: *mut EVP_MD_CTX); -- pub fn EVP_PKEY_bits(key: *mut EVP_PKEY) -> c_int; -- -- pub fn sk_new_null() -> *mut _STACK; -- pub fn sk_num(st: *const _STACK) -> c_int; -- pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void; -- pub fn sk_free(st: *mut _STACK); -- pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int; -- pub fn sk_pop_free(st: *mut _STACK, free: Option); -- pub fn sk_pop(st: *mut _STACK) -> *mut c_void; -- -- pub fn SSLeay() -> c_ulong; -- pub fn SSLeay_version(key: c_int) -> *const c_char; -- -- #[cfg(ossl102)] -- pub fn SSL_extension_supported(ext_type: c_uint) -> c_int; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v110.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v110.rs +++ /dev/null @@ -1,398 +0,0 @@ ---- src/vendor/openssl-sys/src/openssl/v110.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/openssl/v110.rs -@@ -1,395 +0,0 @@ --use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; --use std::ptr; --use std::sync::{Once, ONCE_INIT}; -- --pub enum BIGNUM {} --pub enum BIO {} --pub enum BIO_METHOD {} --pub enum CRYPTO_EX_DATA {} --pub enum DH {} --pub enum DSA {} --pub enum ECDSA_SIG {} --pub enum EVP_CIPHER {} --pub enum EVP_MD_CTX {} --pub enum EVP_PKEY {} --pub enum HMAC_CTX {} --pub enum OPENSSL_STACK {} --pub enum PKCS12 {} --pub enum RSA {} --pub enum SSL {} --pub enum SSL_CTX {} --pub enum SSL_SESSION {} --pub enum stack_st_ASN1_OBJECT {} --pub enum stack_st_GENERAL_NAME {} --pub enum stack_st_OPENSSL_STRING {} --pub enum stack_st_void {} --pub enum stack_st_X509 {} --pub enum stack_st_X509_NAME {} --pub enum stack_st_X509_ATTRIBUTE {} --pub enum stack_st_X509_EXTENSION {} --pub enum stack_st_SSL_CIPHER {} --pub enum OPENSSL_INIT_SETTINGS {} --pub enum X509 {} --pub enum X509_ALGOR {} --pub enum X509_VERIFY_PARAM {} --pub enum X509_REQ {} -- --pub const CMS_ASCIICRLF: c_uint = 0x80000; -- --pub const SSL_CTRL_SET_MIN_PROTO_VERSION: c_int = 123; --pub const SSL_CTRL_SET_MAX_PROTO_VERSION: c_int = 124; --#[cfg(ossl110g)] --pub const SSL_CTRL_GET_MIN_PROTO_VERSION: c_int = 130; --#[cfg(ossl110g)] --pub const SSL_CTRL_GET_MAX_PROTO_VERSION: c_int = 131; -- --pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000000; --pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000000; --pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000000; --pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000000; --pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000000; --pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000000; --pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000000; --pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00000000; --pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00000000; --pub const SSL_OP_NO_SSLv2: c_ulong = 0x00000000; -- --pub const OPENSSL_VERSION: c_int = 0; --pub const OPENSSL_CFLAGS: c_int = 1; --pub const OPENSSL_BUILT_ON: c_int = 2; --pub const OPENSSL_PLATFORM: c_int = 3; --pub const OPENSSL_DIR: c_int = 4; -- --pub const CRYPTO_EX_INDEX_SSL: c_int = 0; --pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1; -- --pub const OPENSSL_INIT_LOAD_SSL_STRINGS: u64 = 0x00200000; -- --pub const X509_V_ERR_DANE_NO_MATCH: c_int = 65; --pub const X509_V_ERR_EE_KEY_TOO_SMALL: c_int = 66; --pub const X509_V_ERR_CA_KEY_TOO_SMALL: c_int = 67; --pub const X509_V_ERR_CA_MD_TOO_WEAK: c_int = 68; --pub const X509_V_ERR_INVALID_CALL: c_int = 69; --pub const X509_V_ERR_STORE_LOOKUP: c_int = 70; --pub const X509_V_ERR_NO_VALID_SCTS: c_int = 71; -- --pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: c_uint = 0x20; -- --pub fn init() { -- // explicitly initialize to work around https://github.com/openssl/openssl/issues/3505 -- static INIT: Once = ONCE_INIT; -- -- INIT.call_once(|| unsafe { -- OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, ptr::null_mut()); -- }) --} -- --pub unsafe fn SSL_CTX_set_min_proto_version(ctx: *mut ::SSL_CTX, version: c_int) -> c_int { -- ::SSL_CTX_ctrl( -- ctx, -- SSL_CTRL_SET_MIN_PROTO_VERSION, -- version as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --pub unsafe fn SSL_CTX_set_max_proto_version(ctx: *mut ::SSL_CTX, version: c_int) -> c_int { -- ::SSL_CTX_ctrl( -- ctx, -- SSL_CTRL_SET_MAX_PROTO_VERSION, -- version as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --#[cfg(ossl110g)] --pub unsafe fn SSL_CTX_get_min_proto_version(ctx: *mut ::SSL_CTX) -> c_int { -- ::SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int --} -- --#[cfg(ossl110g)] --pub unsafe fn SSL_CTX_get_max_proto_version(ctx: *mut ::SSL_CTX) -> c_int { -- ::SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int --} -- --pub unsafe fn SSL_set_min_proto_version(s: *mut ::SSL, version: c_int) -> c_int { -- ::SSL_ctrl( -- s, -- SSL_CTRL_SET_MIN_PROTO_VERSION, -- version as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --pub unsafe fn SSL_set_max_proto_version(s: *mut ::SSL, version: c_int) -> c_int { -- ::SSL_ctrl( -- s, -- SSL_CTRL_SET_MAX_PROTO_VERSION, -- version as c_long, -- ptr::null_mut(), -- ) as c_int --} -- --#[cfg(ossl110g)] --pub unsafe fn SSL_get_min_proto_version(s: *mut ::SSL) -> c_int { -- ::SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int --} -- --#[cfg(ossl110g)] --pub unsafe fn SSL_get_max_proto_version(s: *mut ::SSL) -> c_int { -- ::SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int --} -- --extern "C" { -- pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; -- pub fn BIO_s_file() -> *const BIO_METHOD; -- pub fn BIO_s_mem() -> *const BIO_METHOD; -- -- pub fn BN_get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_1536(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_2048(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_3072(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_4096(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_6144(bn: *mut BIGNUM) -> *mut BIGNUM; -- pub fn BN_get_rfc3526_prime_8192(bn: *mut BIGNUM) -> *mut BIGNUM; -- -- pub fn CRYPTO_malloc(num: size_t, file: *const c_char, line: c_int) -> *mut c_void; -- pub fn CRYPTO_free(buf: *mut c_void, file: *const c_char, line: c_int); -- -- pub fn EVP_chacha20() -> *const ::EVP_CIPHER; -- pub fn EVP_chacha20_poly1305() -> *const ::EVP_CIPHER; -- -- pub fn HMAC_CTX_new() -> *mut HMAC_CTX; -- pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX); -- -- pub fn OCSP_cert_to_id( -- dgst: *const ::EVP_MD, -- subject: *const ::X509, -- issuer: *const ::X509, -- ) -> *mut ::OCSP_CERTID; -- -- pub fn TLS_method() -> *const ::SSL_METHOD; -- pub fn DTLS_method() -> *const ::SSL_METHOD; -- pub fn SSL_CIPHER_get_version(cipher: *const ::SSL_CIPHER) -> *const c_char; -- pub fn X509_get_subject_name(x: *const ::X509) -> *mut ::X509_NAME; -- pub fn X509_get_issuer_name(x: *const ::X509) -> *mut ::X509_NAME; -- pub fn X509_set1_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_set1_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -- pub fn X509_get_ext_d2i( -- x: *const ::X509, -- nid: c_int, -- crit: *mut c_int, -- idx: *mut c_int, -- ) -> *mut c_void; -- pub fn X509_NAME_add_entry_by_NID( -- x: *mut ::X509_NAME, -- field: c_int, -- ty: c_int, -- bytes: *const c_uchar, -- len: c_int, -- loc: c_int, -- set: c_int, -- ) -> c_int; -- pub fn X509_get_signature_nid(x: *const X509) -> c_int; -- pub fn X509_ALGOR_get0( -- paobj: *mut *const ::ASN1_OBJECT, -- pptype: *mut c_int, -- ppval: *mut *const c_void, -- alg: *const ::X509_ALGOR, -- ); -- pub fn X509_NAME_entry_count(n: *const ::X509_NAME) -> c_int; -- pub fn X509_NAME_get_entry(n: *const ::X509_NAME, loc: c_int) -> *mut ::X509_NAME_ENTRY; -- pub fn X509_NAME_ENTRY_get_data(ne: *const ::X509_NAME_ENTRY) -> *mut ::ASN1_STRING; -- pub fn X509_NAME_ENTRY_get_object(ne: *const ::X509_NAME_ENTRY) -> *mut ::ASN1_OBJECT; -- pub fn X509V3_EXT_nconf_nid( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- ext_nid: c_int, -- value: *const c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn X509V3_EXT_nconf( -- conf: *mut ::CONF, -- ctx: *mut ::X509V3_CTX, -- name: *const c_char, -- value: *const c_char, -- ) -> *mut ::X509_EXTENSION; -- pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *const ::ASN1_STRING) -> c_int; -- pub fn BN_is_negative(b: *const ::BIGNUM) -> c_int; -- pub fn EVP_CIPHER_key_length(cipher: *const EVP_CIPHER) -> c_int; -- pub fn EVP_CIPHER_block_size(cipher: *const EVP_CIPHER) -> c_int; -- pub fn EVP_CIPHER_iv_length(cipher: *const EVP_CIPHER) -> c_int; -- pub fn EVP_PBE_scrypt( -- pass: *const c_char, -- passlen: size_t, -- salt: *const c_uchar, -- saltlen: size_t, -- N: u64, -- r: u64, -- p: u64, -- maxmem: u64, -- key: *mut c_uchar, -- keylen: size_t, -- ) -> c_int; -- pub fn DSA_get0_pqg( -- d: *const ::DSA, -- p: *mut *const ::BIGNUM, -- q: *mut *const ::BIGNUM, -- q: *mut *const ::BIGNUM, -- ); -- pub fn DSA_set0_pqg( -- d: *mut ::DSA, -- p: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- ) -> c_int; -- pub fn DSA_get0_key( -- d: *const ::DSA, -- pub_key: *mut *const ::BIGNUM, -- priv_key: *mut *const ::BIGNUM, -- ); -- pub fn DSA_set0_key( -- d: *mut ::DSA, -- pub_key: *mut ::BIGNUM, -- priv_key: *mut ::BIGNUM, -- ) -> c_int; -- pub fn RSA_get0_key( -- r: *const ::RSA, -- n: *mut *const ::BIGNUM, -- e: *mut *const ::BIGNUM, -- d: *mut *const ::BIGNUM, -- ); -- pub fn RSA_get0_factors(r: *const ::RSA, p: *mut *const ::BIGNUM, q: *mut *const ::BIGNUM); -- pub fn RSA_get0_crt_params( -- r: *const ::RSA, -- dmp1: *mut *const ::BIGNUM, -- dmq1: *mut *const ::BIGNUM, -- iqmp: *mut *const ::BIGNUM, -- ); -- pub fn RSA_set0_key( -- r: *mut ::RSA, -- n: *mut ::BIGNUM, -- e: *mut ::BIGNUM, -- d: *mut ::BIGNUM, -- ) -> c_int; -- pub fn RSA_set0_factors(r: *mut ::RSA, p: *mut ::BIGNUM, q: *mut ::BIGNUM) -> c_int; -- pub fn RSA_set0_crt_params( -- r: *mut ::RSA, -- dmp1: *mut ::BIGNUM, -- dmq1: *mut ::BIGNUM, -- iqmp: *mut ::BIGNUM, -- ) -> c_int; -- pub fn ASN1_STRING_get0_data(x: *const ::ASN1_STRING) -> *const c_uchar; -- pub fn OPENSSL_sk_num(stack: *const ::OPENSSL_STACK) -> c_int; -- pub fn OPENSSL_sk_value(stack: *const ::OPENSSL_STACK, idx: c_int) -> *mut c_void; -- pub fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong; -- pub fn SSL_CTX_set_options(ctx: *mut ::SSL_CTX, op: c_ulong) -> c_ulong; -- pub fn SSL_CTX_clear_options(ctx: *mut ::SSL_CTX, op: c_ulong) -> c_ulong; -- pub fn SSL_CTX_sess_set_get_cb( -- ctx: *mut ::SSL_CTX, -- get_session_cb: Option< -- unsafe extern "C" fn(*mut ::SSL, *const c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, -- >, -- ); -- pub fn SSL_get_client_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; -- pub fn SSL_get_server_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; -- pub fn SSL_get0_verified_chain(ssl: *const SSL) -> *mut stack_st_X509; -- pub fn X509_getm_notAfter(x: *const ::X509) -> *mut ::ASN1_TIME; -- pub fn X509_getm_notBefore(x: *const ::X509) -> *mut ::ASN1_TIME; -- pub fn X509_get0_signature( -- psig: *mut *const ::ASN1_BIT_STRING, -- palg: *mut *const ::X509_ALGOR, -- x: *const ::X509, -- ); -- pub fn DH_set0_pqg( -- dh: *mut ::DH, -- p: *mut ::BIGNUM, -- q: *mut ::BIGNUM, -- g: *mut ::BIGNUM, -- ) -> c_int; -- pub fn BIO_set_init(a: *mut ::BIO, init: c_int); -- pub fn BIO_set_data(a: *mut ::BIO, data: *mut c_void); -- pub fn BIO_get_data(a: *mut ::BIO) -> *mut c_void; -- pub fn BIO_meth_new(type_: c_int, name: *const c_char) -> *mut ::BIO_METHOD; -- pub fn BIO_meth_free(biom: *mut ::BIO_METHOD); -- // FIXME should wrap in Option -- pub fn BIO_meth_set_write( -- biom: *mut ::BIO_METHOD, -- write: unsafe extern "C" fn(*mut ::BIO, *const c_char, c_int) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_read( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, *mut c_char, c_int) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_puts( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, *const c_char) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_ctrl( -- biom: *mut ::BIO_METHOD, -- read: unsafe extern "C" fn(*mut ::BIO, c_int, c_long, *mut c_void) -> c_long, -- ) -> c_int; -- pub fn BIO_meth_set_create( -- biom: *mut ::BIO_METHOD, -- create: unsafe extern "C" fn(*mut ::BIO) -> c_int, -- ) -> c_int; -- pub fn BIO_meth_set_destroy( -- biom: *mut ::BIO_METHOD, -- destroy: unsafe extern "C" fn(*mut ::BIO) -> c_int, -- ) -> c_int; -- pub fn CRYPTO_get_ex_new_index( -- class_index: c_int, -- argl: c_long, -- argp: *mut c_void, -- new_func: Option<::CRYPTO_EX_new>, -- dup_func: Option<::CRYPTO_EX_dup>, -- free_func: Option<::CRYPTO_EX_free>, -- ) -> c_int; -- pub fn X509_up_ref(x: *mut X509) -> c_int; -- pub fn SSL_CTX_up_ref(x: *mut SSL_CTX) -> c_int; -- pub fn SSL_session_reused(ssl: *mut SSL) -> c_int; -- pub fn SSL_SESSION_get_master_key( -- session: *const SSL_SESSION, -- out: *mut c_uchar, -- outlen: size_t, -- ) -> size_t; -- pub fn SSL_SESSION_up_ref(ses: *mut SSL_SESSION) -> c_int; -- pub fn X509_get0_extensions(req: *const ::X509) -> *const stack_st_X509_EXTENSION; -- pub fn X509_STORE_CTX_get0_chain(ctx: *mut ::X509_STORE_CTX) -> *mut stack_st_X509; -- pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX; -- pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX); -- pub fn EVP_PKEY_bits(key: *const EVP_PKEY) -> c_int; -- -- pub fn OpenSSL_version_num() -> c_ulong; -- pub fn OpenSSL_version(key: c_int) -> *const c_char; -- pub fn OPENSSL_init_ssl(opts: u64, settings: *const OPENSSL_INIT_SETTINGS) -> c_int; -- pub fn OPENSSL_sk_new_null() -> *mut ::OPENSSL_STACK; -- pub fn OPENSSL_sk_free(st: *mut ::OPENSSL_STACK); -- pub fn OPENSSL_sk_pop_free( -- st: *mut ::OPENSSL_STACK, -- free: Option, -- ); -- pub fn OPENSSL_sk_push(st: *mut ::OPENSSL_STACK, data: *const c_void) -> c_int; -- pub fn OPENSSL_sk_pop(st: *mut ::OPENSSL_STACK) -> *mut c_void; -- -- pub fn PKCS12_create( -- pass: *const c_char, -- friendly_name: *const c_char, -- pkey: *mut EVP_PKEY, -- cert: *mut X509, -- ca: *mut stack_st_X509, -- nid_key: c_int, -- nid_cert: c_int, -- iter: c_int, -- mac_iter: c_int, -- keytype: c_int, -- ) -> *mut PKCS12; -- pub fn X509_REQ_get_version(req: *const X509_REQ) -> c_long; -- pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut ::X509_NAME; -- pub fn SSL_extension_supported(ext_type: c_uint) -> c_int; -- pub fn ECDSA_SIG_get0(sig: *const ECDSA_SIG, pr: *mut *const BIGNUM, ps: *mut *const BIGNUM); -- pub fn ECDSA_SIG_set0(sig: *mut ECDSA_SIG, pr: *mut BIGNUM, ps: *mut BIGNUM) -> c_int; -- -- pub fn SSL_CIPHER_get_cipher_nid(c: *const ::SSL_CIPHER) -> c_int; -- pub fn SSL_CIPHER_get_digest_nid(c: *const ::SSL_CIPHER) -> c_int; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v111.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_openssl_v111.rs +++ /dev/null @@ -1,140 +0,0 @@ ---- src/vendor/openssl-sys/src/openssl/v111.rs.orig 2018-09-11 04:49:55 UTC -+++ src/vendor/openssl-sys/src/openssl/v111.rs -@@ -1,137 +0,0 @@ --use libc::{c_char, c_int, c_uchar, c_uint, c_ulong, c_void, size_t}; -- --pub type SSL_CTX_keylog_cb_func = -- Option; -- --pub type SSL_custom_ext_add_cb_ex = Option< -- unsafe extern "C" fn( -- ssl: *mut ::SSL, -- ext_type: c_uint, -- context: c_uint, -- out: *mut *const c_uchar, -- outlen: *mut size_t, -- x: *mut ::X509, -- chainidx: size_t, -- al: *mut c_int, -- add_arg: *mut c_void, -- ) -> c_int, -->; -- --pub type SSL_custom_ext_free_cb_ex = Option< -- unsafe extern "C" fn( -- ssl: *mut ::SSL, -- ext_type: c_uint, -- context: c_uint, -- out: *mut *const c_uchar, -- add_arg: *mut c_void, -- ), -->; -- --pub type SSL_custom_ext_parse_cb_ex = Option< -- unsafe extern "C" fn( -- ssl: *mut ::SSL, -- ext_type: c_uint, -- context: c_uint, -- input: *const c_uchar, -- inlen: size_t, -- x: *mut ::X509, -- chainidx: size_t, -- al: *mut c_int, -- parse_arg: *mut c_void, -- ) -> c_int, -->; -- --pub const SSL_COOKIE_LENGTH: c_int = 4096; -- --pub const SSL_OP_ENABLE_MIDDLEBOX_COMPAT: c_ulong = 0x00100000; --pub const SSL_OP_NO_TLSv1_3: c_ulong = 0x20000000; -- --pub const TLS1_3_VERSION: c_int = 0x304; -- --pub const SSL_EXT_TLS_ONLY: c_uint = 0x0001; --/* This extension is only allowed in DTLS */ --pub const SSL_EXT_DTLS_ONLY: c_uint = 0x0002; --/* Some extensions may be allowed in DTLS but we don't implement them for it */ --pub const SSL_EXT_TLS_IMPLEMENTATION_ONLY: c_uint = 0x0004; --/* Most extensions are not defined for SSLv3 but EXT_TYPE_renegotiate is */ --pub const SSL_EXT_SSL3_ALLOWED: c_uint = 0x0008; --/* Extension is only defined for TLS1.2 and below */ --pub const SSL_EXT_TLS1_2_AND_BELOW_ONLY: c_uint = 0x0010; --/* Extension is only defined for TLS1.3 and above */ --pub const SSL_EXT_TLS1_3_ONLY: c_uint = 0x0020; --/* Ignore this extension during parsing if we are resuming */ --pub const SSL_EXT_IGNORE_ON_RESUMPTION: c_uint = 0x0040; --pub const SSL_EXT_CLIENT_HELLO: c_uint = 0x0080; --/* Really means TLS1.2 or below */ --pub const SSL_EXT_TLS1_2_SERVER_HELLO: c_uint = 0x0100; --pub const SSL_EXT_TLS1_3_SERVER_HELLO: c_uint = 0x0200; --pub const SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS: c_uint = 0x0400; --pub const SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST: c_uint = 0x0800; --pub const SSL_EXT_TLS1_3_CERTIFICATE: c_uint = 0x1000; --pub const SSL_EXT_TLS1_3_NEW_SESSION_TICKET: c_uint = 0x2000; --pub const SSL_EXT_TLS1_3_CERTIFICATE_REQUEST: c_uint = 0x4000; -- --pub const SSL_READ_EARLY_DATA_ERROR: c_int = 0; --pub const SSL_READ_EARLY_DATA_SUCCESS: c_int = 1; --pub const SSL_READ_EARLY_DATA_FINISH: c_int = 2; -- --extern "C" { -- pub fn SSL_CTX_set_keylog_callback(ctx: *mut ::SSL_CTX, cb: SSL_CTX_keylog_cb_func); -- pub fn SSL_CTX_add_custom_ext( -- ctx: *mut ::SSL_CTX, -- ext_type: c_uint, -- context: c_uint, -- add_cb: SSL_custom_ext_add_cb_ex, -- free_cb: SSL_custom_ext_free_cb_ex, -- add_arg: *mut c_void, -- parse_cb: SSL_custom_ext_parse_cb_ex, -- parse_arg: *mut c_void, -- ) -> c_int; -- pub fn SSL_CIPHER_get_handshake_digest(cipher: *const ::SSL_CIPHER) -> *const ::EVP_MD; -- pub fn SSL_CTX_set_stateless_cookie_generate_cb( -- s: *mut ::SSL_CTX, -- cb: Option< -- unsafe extern "C" fn(ssl: *mut ::SSL, cookie: *mut c_uchar, cookie_len: *mut size_t) -- -> c_int, -- >, -- ); -- pub fn SSL_CTX_set_stateless_cookie_verify_cb( -- s: *mut ::SSL_CTX, -- cb: Option< -- unsafe extern "C" fn(ssl: *mut ::SSL, cookie: *const c_uchar, cookie_len: size_t) -- -> c_int, -- >, -- ); -- pub fn SSL_CTX_set_max_early_data(ctx: *mut ::SSL_CTX, max_early_data: u32) -> c_int; -- pub fn SSL_CTX_get_max_early_data(ctx: *const ::SSL_CTX) -> u32; -- pub fn SSL_CTX_set_ciphersuites(ctx: *mut ::SSL_CTX, str: *const c_char) -> c_int; -- -- pub fn SSL_set_max_early_data(ctx: *mut ::SSL, max_early_data: u32) -> c_int; -- pub fn SSL_get_max_early_data(ctx: *const ::SSL) -> u32; -- pub fn SSL_stateless(s: *mut ::SSL) -> c_int; -- pub fn SSL_export_keying_material_early( -- s: *mut ::SSL, -- out: *mut c_uchar, -- olen: size_t, -- label: *const c_char, -- llen: size_t, -- context: *const c_uchar, -- contextlen: size_t, -- ) -> c_int; -- pub fn SSL_write_early_data( -- s: *mut ::SSL, -- buf: *const c_void, -- num: size_t, -- written: *mut size_t, -- ) -> c_int; -- pub fn SSL_read_early_data( -- s: *mut ::SSL, -- buf: *mut c_void, -- num: size_t, -- readbytes: *mut size_t, -- ) -> c_int; -- pub fn SSL_set_ciphersuites(ssl: *mut ::SSL, str: *const c_char) -> c_int; -- -- pub fn SSL_SESSION_set_max_early_data(ctx: *mut ::SSL_SESSION, max_early_data: u32) -> c_int; -- pub fn SSL_SESSION_get_max_early_data(ctx: *const ::SSL_SESSION) -> u32; --} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_ossl__typ.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_ossl__typ.rs +++ /dev/null @@ -1,992 +0,0 @@ ---- src/vendor/openssl-sys/src/ossl_typ.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/ossl_typ.rs -@@ -0,0 +1,989 @@ -+use libc::*; -+ -+#[allow(unused_imports)] -+use *; -+ -+pub enum ASN1_INTEGER {} -+pub enum ASN1_GENERALIZEDTIME {} -+pub enum ASN1_STRING {} -+pub enum ASN1_BIT_STRING {} -+pub enum ASN1_TIME {} -+pub enum ASN1_TYPE {} -+pub enum ASN1_OBJECT {} -+ -+pub enum bio_st {} // FIXME remove -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum BIO {} -+ } else { -+ #[repr(C)] -+ pub struct BIO { -+ pub method: *mut BIO_METHOD, -+ pub callback: Option< -+ unsafe extern "C" fn(*mut BIO, c_int, *const c_char, c_int, c_long, c_long) -> c_long, -+ >, -+ pub cb_arg: *mut c_char, -+ pub init: c_int, -+ pub shutdown: c_int, -+ pub flags: c_int, -+ pub retry_reason: c_int, -+ pub num: c_int, -+ pub ptr: *mut c_void, -+ pub next_bio: *mut BIO, -+ pub prev_bio: *mut BIO, -+ pub references: c_int, -+ pub num_read: c_ulong, -+ pub num_write: c_ulong, -+ pub ex_data: CRYPTO_EX_DATA, -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum BIGNUM {} -+ } else { -+ #[repr(C)] -+ pub struct BIGNUM { -+ pub d: *mut BN_ULONG, -+ pub top: c_int, -+ pub dmax: c_int, -+ pub neg: c_int, -+ pub flags: c_int, -+ } -+ } -+} -+pub enum BN_BLINDING {} -+pub enum BN_MONT_CTX {} -+ -+pub enum BN_CTX {} -+pub enum BN_GENCB {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum EVP_CIPHER {} -+ } else { -+ #[repr(C)] -+ pub struct EVP_CIPHER { -+ pub nid: c_int, -+ pub block_size: c_int, -+ pub key_len: c_int, -+ pub iv_len: c_int, -+ pub flags: c_ulong, -+ pub init: Option< -+ unsafe extern "C" fn(*mut EVP_CIPHER_CTX, *const c_uchar, *const c_uchar, c_int) -> c_int, -+ >, -+ pub do_cipher: Option< -+ unsafe extern "C" fn(*mut EVP_CIPHER_CTX, *mut c_uchar, *const c_uchar, size_t) -> c_int, -+ >, -+ pub cleanup: Option c_int>, -+ pub ctx_size: c_int, -+ pub set_asn1_parameters: -+ Option c_int>, -+ pub get_asn1_parameters: -+ Option c_int>, -+ pub ctrl: -+ Option c_int>, -+ pub app_data: *mut c_void, -+ } -+ } -+} -+pub enum EVP_CIPHER_CTX {} -+pub enum EVP_MD {} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum EVP_MD_CTX {} -+ } else { -+ #[repr(C)] -+ pub struct EVP_MD_CTX { -+ digest: *mut EVP_MD, -+ engine: *mut ENGINE, -+ flags: c_ulong, -+ md_data: *mut c_void, -+ pctx: *mut EVP_PKEY_CTX, -+ update: *mut c_void, -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum EVP_PKEY {} -+ } else { -+ #[repr(C)] -+ pub struct EVP_PKEY { -+ pub type_: c_int, -+ pub save_type: c_int, -+ pub references: c_int, -+ pub ameth: *const EVP_PKEY_ASN1_METHOD, -+ pub engine: *mut ENGINE, -+ pub pkey: *mut c_void, -+ pub save_parameters: c_int, -+ pub attributes: *mut stack_st_X509_ATTRIBUTE, -+ } -+ } -+} -+ -+pub enum EVP_PKEY_ASN1_METHOD {} -+ -+pub enum EVP_PKEY_CTX {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum HMAC_CTX {} -+ } else { -+ #[repr(C)] -+ pub struct HMAC_CTX { -+ md: *mut EVP_MD, -+ md_ctx: EVP_MD_CTX, -+ i_ctx: EVP_MD_CTX, -+ o_ctx: EVP_MD_CTX, -+ key_length: c_uint, -+ key: [c_uchar; 128], -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum DH {} -+ } else { -+ #[repr(C)] -+ pub struct DH { -+ pub pad: c_int, -+ pub version: c_int, -+ pub p: *mut ::BIGNUM, -+ pub g: *mut ::BIGNUM, -+ pub length: c_long, -+ pub pub_key: *mut ::BIGNUM, -+ pub priv_key: *mut ::BIGNUM, -+ pub flags: c_int, -+ pub method_mont_p: *mut ::BN_MONT_CTX, -+ pub q: *mut ::BIGNUM, -+ pub j: *mut ::BIGNUM, -+ pub seed: *mut c_uchar, -+ pub seedlen: c_int, -+ pub counter: *mut ::BIGNUM, -+ pub references: c_int, -+ pub ex_data: ::CRYPTO_EX_DATA, -+ pub meth: *const ::DH_METHOD, -+ pub engine: *mut ::ENGINE, -+ } -+ } -+} -+pub enum DH_METHOD {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum DSA {} -+ } else { -+ #[repr(C)] -+ pub struct DSA { -+ pub pad: c_int, -+ pub version: c_long, -+ pub write_params: c_int, -+ -+ pub p: *mut BIGNUM, -+ pub q: *mut BIGNUM, -+ pub g: *mut BIGNUM, -+ pub pub_key: *mut BIGNUM, -+ pub priv_key: *mut BIGNUM, -+ pub kinv: *mut BIGNUM, -+ pub r: *mut BIGNUM, -+ -+ pub flags: c_int, -+ pub method_mont_p: *mut BN_MONT_CTX, -+ pub references: c_int, -+ pub ex_data: CRYPTO_EX_DATA, -+ pub meth: *const DSA_METHOD, -+ pub engine: *mut ENGINE, -+ } -+ } -+} -+pub enum DSA_METHOD {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum RSA {} -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct RSA { -+ pub pad: c_int, -+ pub version: c_long, -+ pub meth: *const ::RSA_METHOD, -+ -+ pub engine: *mut ::ENGINE, -+ pub n: *mut ::BIGNUM, -+ pub e: *mut ::BIGNUM, -+ pub d: *mut ::BIGNUM, -+ pub p: *mut ::BIGNUM, -+ pub q: *mut ::BIGNUM, -+ pub dmp1: *mut ::BIGNUM, -+ pub dmq1: *mut ::BIGNUM, -+ pub iqmp: *mut ::BIGNUM, -+ -+ pub ex_data: ::CRYPTO_EX_DATA, -+ pub references: c_int, -+ pub flags: c_int, -+ -+ pub _method_mod_n: *mut ::BN_MONT_CTX, -+ pub _method_mod_p: *mut ::BN_MONT_CTX, -+ pub _method_mod_q: *mut ::BN_MONT_CTX, -+ -+ pub blinding: *mut ::BN_BLINDING, -+ pub mt_blinding: *mut ::BN_BLINDING, -+ } -+ } else { -+ #[repr(C)] -+ pub struct RSA { -+ pub pad: c_int, -+ pub version: c_long, -+ pub meth: *const ::RSA_METHOD, -+ -+ pub engine: *mut ::ENGINE, -+ pub n: *mut ::BIGNUM, -+ pub e: *mut ::BIGNUM, -+ pub d: *mut ::BIGNUM, -+ pub p: *mut ::BIGNUM, -+ pub q: *mut ::BIGNUM, -+ pub dmp1: *mut ::BIGNUM, -+ pub dmq1: *mut ::BIGNUM, -+ pub iqmp: *mut ::BIGNUM, -+ -+ pub ex_data: ::CRYPTO_EX_DATA, -+ pub references: c_int, -+ pub flags: c_int, -+ -+ pub _method_mod_n: *mut ::BN_MONT_CTX, -+ pub _method_mod_p: *mut ::BN_MONT_CTX, -+ pub _method_mod_q: *mut ::BN_MONT_CTX, -+ -+ pub bignum_data: *mut c_char, -+ pub blinding: *mut ::BN_BLINDING, -+ pub mt_blinding: *mut ::BN_BLINDING, -+ } -+ } -+} -+pub enum RSA_METHOD {} -+ -+pub enum EC_KEY {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum X509 {} -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct X509 { -+ pub cert_info: *mut X509_CINF, -+ pub sig_alg: *mut ::X509_ALGOR, -+ pub signature: *mut ::ASN1_BIT_STRING, -+ pub valid: c_int, -+ pub references: c_int, -+ pub name: *mut c_char, -+ pub ex_data: ::CRYPTO_EX_DATA, -+ pub ex_pathlen: c_long, -+ pub ex_pcpathlen: c_long, -+ pub ex_flags: c_ulong, -+ pub ex_kusage: c_ulong, -+ pub ex_xkusage: c_ulong, -+ pub ex_nscert: c_ulong, -+ skid: *mut c_void, -+ akid: *mut c_void, -+ policy_cache: *mut c_void, -+ crldp: *mut c_void, -+ altname: *mut c_void, -+ nc: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_SHA"))] -+ sha1_hash: [c_uchar; 20], -+ aux: *mut c_void, -+ } -+ } else { -+ #[repr(C)] -+ pub struct X509 { -+ pub cert_info: *mut X509_CINF, -+ pub sig_alg: *mut X509_ALGOR, -+ pub signature: *mut ASN1_BIT_STRING, -+ pub valid: c_int, -+ pub references: c_int, -+ pub name: *mut c_char, -+ pub ex_data: CRYPTO_EX_DATA, -+ pub ex_pathlen: c_long, -+ pub ex_pcpathlen: c_long, -+ pub ex_flags: c_ulong, -+ pub ex_kusage: c_ulong, -+ pub ex_xkusage: c_ulong, -+ pub ex_nscert: c_ulong, -+ skid: *mut c_void, -+ akid: *mut c_void, -+ policy_cache: *mut c_void, -+ crldp: *mut c_void, -+ altname: *mut c_void, -+ nc: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))] -+ rfc3779_addr: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_RFC3779"))] -+ rfc3779_asid: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_SHA"))] -+ sha1_hash: [c_uchar; 20], -+ aux: *mut c_void, -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum X509_ALGOR {} -+ } else { -+ #[repr(C)] -+ pub struct X509_ALGOR { -+ pub algorithm: *mut ::ASN1_OBJECT, -+ parameter: *mut c_void, -+ } -+ } -+} -+pub enum X509_CRL {} -+pub enum X509_NAME {} -+pub enum X509_STORE {} -+pub enum X509_STORE_CTX {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum X509_VERIFY_PARAM {} -+ } else if #[cfg(libressl251)] { -+ #[repr(C)] -+ pub struct X509_VERIFY_PARAM { -+ pub name: *mut c_char, -+ pub check_time: time_t, -+ pub inh_flags: c_ulong, -+ pub flags: c_ulong, -+ pub purpose: c_int, -+ pub trust: c_int, -+ pub depth: c_int, -+ pub policies: *mut stack_st_ASN1_OBJECT, -+ id: *mut c_void, -+ } -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct X509_VERIFY_PARAM { -+ pub name: *mut c_char, -+ pub check_time: time_t, -+ pub inh_flags: c_ulong, -+ pub flags: c_ulong, -+ pub purpose: c_int, -+ pub trust: c_int, -+ pub depth: c_int, -+ pub policies: *mut stack_st_ASN1_OBJECT, -+ //pub id: *mut X509_VERIFY_PARAM_ID, -+ } -+ } else if #[cfg(ossl102)] { -+ #[repr(C)] -+ pub struct X509_VERIFY_PARAM { -+ pub name: *mut c_char, -+ pub check_time: time_t, -+ pub inh_flags: c_ulong, -+ pub flags: c_ulong, -+ pub purpose: c_int, -+ pub trust: c_int, -+ pub depth: c_int, -+ pub policies: *mut stack_st_ASN1_OBJECT, -+ pub id: *mut X509_VERIFY_PARAM_ID, -+ } -+ } -+} -+ -+#[repr(C)] -+pub struct X509V3_CTX { -+ flags: c_int, -+ issuer_cert: *mut c_void, -+ subject_cert: *mut c_void, -+ subject_req: *mut c_void, -+ crl: *mut c_void, -+ db_meth: *mut c_void, -+ db: *mut c_void, -+ // I like the last comment line, it is copied from OpenSSL sources: -+ // Maybe more here -+} -+pub enum CONF {} -+#[cfg(ossl110)] -+pub enum OPENSSL_INIT_SETTINGS {} -+ -+pub enum ENGINE {} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum SSL {} -+ } else if #[cfg(libressl251)] { -+ #[repr(C)] -+ pub struct SSL { -+ version: c_int, -+ method: *const ::SSL_METHOD, -+ rbio: *mut ::BIO, -+ wbio: *mut ::BIO, -+ bbio: *mut ::BIO, -+ pub server: c_int, -+ s3: *mut c_void, -+ d1: *mut c_void, -+ param: *mut c_void, -+ cipher_list: *mut stack_st_SSL_CIPHER, -+ cert: *mut c_void, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -+ session: *mut ::SSL_SESSION, -+ verify_mode: c_int, -+ error: c_int, -+ error_code: c_int, -+ ctx: *mut ::SSL_CTX, -+ verify_result: c_long, -+ references: c_int, -+ client_version: c_int, -+ max_send_fragment: c_uint, -+ tlsext_hostname: *mut c_char, -+ tlsext_status_type: c_int, -+ initial_ctx: *mut ::SSL_CTX, -+ enc_read_ctx: *mut ::EVP_CIPHER_CTX, -+ read_hash: *mut EVP_MD_CTX, -+ internal: *mut c_void, -+ } -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct SSL { -+ version: c_int, -+ type_: c_int, -+ method: *const ::SSL_METHOD, -+ rbio: *mut c_void, -+ wbio: *mut c_void, -+ bbio: *mut c_void, -+ rwstate: c_int, -+ in_handshake: c_int, -+ handshake_func: Option c_int>, -+ pub server: c_int, -+ new_session: c_int, -+ quiet_shutdown: c_int, -+ shutdown: c_int, -+ state: c_int, -+ rstate: c_int, -+ init_buf: *mut c_void, -+ init_msg: *mut c_void, -+ init_num: c_int, -+ init_off: c_int, -+ packet: *mut c_uchar, -+ packet_length: c_uint, -+ s3: *mut c_void, -+ d1: *mut c_void, -+ read_ahead: c_int, -+ msg_callback: Option< -+ unsafe extern "C" fn(c_int, -+ c_int, -+ c_int, -+ *const c_void, -+ size_t, -+ *mut SSL, -+ *mut c_void), -+ >, -+ msg_callback_arg: *mut c_void, -+ hit: c_int, -+ param: *mut c_void, -+ cipher_list: *mut stack_st_SSL_CIPHER, -+ cipher_list_by_id: *mut stack_st_SSL_CIPHER, -+ mac_flags: c_int, -+ aead_read_ctx: *mut c_void, -+ enc_read_ctx: *mut ::EVP_CIPHER_CTX, -+ read_hash: *mut ::EVP_MD_CTX, -+ aead_write_ctx: *mut c_void, -+ enc_write_ctx: *mut ::EVP_CIPHER_CTX, -+ write_hash: *mut ::EVP_MD_CTX, -+ cert: *mut c_void, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -+ session: *mut ::SSL_SESSION, -+ generate_session_id: ::GEN_SESSION_CB, -+ verify_mode: c_int, -+ verify_callback: Option c_int>, -+ info_callback: Option, -+ error: c_int, -+ error_code: c_int, -+ ctx: *mut ::SSL_CTX, -+ debug: c_int, -+ verify_result: c_long, -+ ex_data: ::CRYPTO_EX_DATA, -+ client_CA: *mut stack_st_X509_NAME, -+ references: c_int, -+ options: c_ulong, -+ mode: c_ulong, -+ max_cert_list: c_long, -+ first_packet: c_int, -+ client_version: c_int, -+ max_send_fragment: c_uint, -+ tlsext_debug_cb: -+ Option, -+ tlsext_debug_arg: *mut c_void, -+ tlsext_hostname: *mut c_char, -+ servername_done: c_int, -+ tlsext_status_type: c_int, -+ tlsext_status_expected: c_int, -+ tlsext_ocsp_ids: *mut c_void, -+ tlsext_ocsp_exts: *mut c_void, -+ tlsext_ocsp_resp: *mut c_uchar, -+ tlsext_ocsp_resplen: c_int, -+ tlsext_ticket_expected: c_int, -+ tlsext_ecpointformatlist_length: size_t, -+ tlsext_ecpointformatlist: *mut c_uchar, -+ tlsext_ellipticcurvelist_length: size_t, -+ tlsext_ellipticcurvelist: *mut c_uchar, -+ tlsext_session_ticket: *mut c_void, -+ tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn, -+ tls_session_ticket_ext_cb_arg: *mut c_void, -+ tls_session_secret_cb: ::tls_session_secret_cb_fn, -+ tls_session_secret_cb_arg: *mut c_void, -+ initial_ctx: *mut ::SSL_CTX, -+ next_proto_negotiated: *mut c_uchar, -+ next_proto_negotiated_len: c_uchar, -+ srtp_profiles: *mut c_void, -+ srtp_profile: *mut c_void, -+ tlsext_heartbeat: c_uint, -+ tlsext_hb_pending: c_uint, -+ tlsext_hb_seq: c_uint, -+ alpn_client_proto_list: *mut c_uchar, -+ alpn_client_proto_list_len: c_uint, -+ renegotiate: c_int, -+ } -+ } else { -+ #[repr(C)] -+ pub struct SSL { -+ version: c_int, -+ type_: c_int, -+ method: *const ::SSL_METHOD, -+ rbio: *mut c_void, -+ wbio: *mut c_void, -+ bbio: *mut c_void, -+ rwstate: c_int, -+ in_handshake: c_int, -+ handshake_func: Option c_int>, -+ pub server: c_int, -+ new_session: c_int, -+ quiet_session: c_int, -+ shutdown: c_int, -+ state: c_int, -+ rstate: c_int, -+ init_buf: *mut c_void, -+ init_msg: *mut c_void, -+ init_num: c_int, -+ init_off: c_int, -+ packet: *mut c_uchar, -+ packet_length: c_uint, -+ s2: *mut c_void, -+ s3: *mut c_void, -+ d1: *mut c_void, -+ read_ahead: c_int, -+ msg_callback: Option< -+ unsafe extern "C" fn(c_int, c_int, c_int, *const c_void, size_t, *mut SSL, *mut c_void), -+ >, -+ msg_callback_arg: *mut c_void, -+ hit: c_int, -+ param: *mut c_void, -+ cipher_list: *mut stack_st_SSL_CIPHER, -+ cipher_list_by_id: *mut stack_st_SSL_CIPHER, -+ mac_flags: c_int, -+ enc_read_ctx: *mut ::EVP_CIPHER_CTX, -+ read_hash: *mut ::EVP_MD_CTX, -+ expand: *mut c_void, -+ enc_write_ctx: *mut ::EVP_CIPHER_CTX, -+ write_hash: *mut ::EVP_MD_CTX, -+ compress: *mut c_void, -+ cert: *mut c_void, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -+ session: *mut ::SSL_SESSION, -+ generate_session_id: ::GEN_SESSION_CB, -+ verify_mode: c_int, -+ verify_callback: Option c_int>, -+ info_callback: Option, -+ error: c_int, -+ error_code: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -+ kssl_ctx: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_client_callback: Option< -+ unsafe extern "C" fn(*mut SSL, *const c_char, *mut c_char, c_uint, *mut c_uchar, c_uint) -+ -> c_uint, -+ >, -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_server_callback: -+ Option c_uint>, -+ ctx: *mut ::SSL_CTX, -+ debug: c_int, -+ verify_result: c_long, -+ ex_data: ::CRYPTO_EX_DATA, -+ client_CA: *mut stack_st_X509_NAME, -+ references: c_int, -+ options: c_ulong, -+ mode: c_ulong, -+ max_cert_list: c_long, -+ first_packet: c_int, -+ client_version: c_int, -+ max_send_fragment: c_uint, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_debug_cb: -+ Option, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_debug_arg: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_hostname: *mut c_char, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ servername_done: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_status_type: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_status_expected: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ocsp_ids: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ocsp_exts: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ocsp_resp: *mut c_uchar, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ocsp_resplen: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ticket_expected: c_int, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ecpointformatlist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ecpointformatlist: *mut c_uchar, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ellipticcurvelist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ellipticcurvelist: *mut c_uchar, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_opaque_prf_input: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_opaque_prf_input_len: size_t, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_session_ticket: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_session_ticket_ext_cb: ::tls_session_ticket_ext_cb_fn, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tls_session_ticket_ext_cb_arg: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tls_session_secret_cb: ::tls_session_secret_cb_fn, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tls_session_secret_cb_arg: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ initial_ctx: *mut ::SSL_CTX, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_proto_negotiated: *mut c_uchar, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_proto_negotiated_len: c_uchar, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ srtp_profiles: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ srtp_profile: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_heartbeat: c_uint, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_hb_pending: c_uint, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_hb_seq: c_uint, -+ renegotiate: c_int, -+ #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -+ srp_ctx: ::SRP_CTX, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_client_proto_list: *mut c_uchar, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_client_proto_list_len: c_uint, -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum SSL_CTX {} -+ } else if #[cfg(libressl251)] { -+ #[repr(C)] -+ pub struct SSL_CTX { -+ method: *const ::SSL_METHOD, -+ cipher_list: *mut stack_st_SSL_CIPHER, -+ cert_store: *mut c_void, -+ session_timeout: c_long, -+ pub references: c_int, -+ extra_certs: *mut stack_st_X509, -+ verify_mode: c_int, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -+ param: *mut ::X509_VERIFY_PARAM, -+ default_passwd_callback: *mut c_void, -+ default_passwd_callback_userdata: *mut c_void, -+ internal: *mut c_void, -+ } -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct SSL_CTX { -+ method: *mut c_void, -+ cipher_list: *mut c_void, -+ cipher_list_by_id: *mut c_void, -+ cert_store: *mut c_void, -+ sessions: *mut c_void, -+ session_cache_size: c_ulong, -+ session_cache_head: *mut c_void, -+ session_cache_tail: *mut c_void, -+ session_cache_mode: c_int, -+ session_timeout: c_long, -+ new_session_cb: *mut c_void, -+ remove_session_cb: *mut c_void, -+ get_session_cb: *mut c_void, -+ stats: [c_int; 11], -+ pub references: c_int, -+ app_verify_callback: *mut c_void, -+ app_verify_arg: *mut c_void, -+ default_passwd_callback: *mut c_void, -+ default_passwd_callback_userdata: *mut c_void, -+ client_cert_cb: *mut c_void, -+ app_gen_cookie_cb: *mut c_void, -+ app_verify_cookie_cb: *mut c_void, -+ ex_dat: ::CRYPTO_EX_DATA, -+ rsa_md5: *mut c_void, -+ md5: *mut c_void, -+ sha1: *mut c_void, -+ extra_certs: *mut c_void, -+ comp_methods: *mut c_void, -+ info_callback: *mut c_void, -+ client_CA: *mut c_void, -+ options: c_ulong, -+ mode: c_ulong, -+ max_cert_list: c_long, -+ cert: *mut c_void, -+ read_ahead: c_int, -+ msg_callback: *mut c_void, -+ msg_callback_arg: *mut c_void, -+ verify_mode: c_int, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; 32], -+ default_verify_callback: *mut c_void, -+ generate_session_id: *mut c_void, -+ param: *mut c_void, -+ quiet_shutdown: c_int, -+ max_send_fragment: c_uint, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))] -+ client_cert_engine: *mut c_void, -+ -+ tlsext_servername_callback: *mut c_void, -+ tlsect_servername_arg: *mut c_void, -+ tlsext_tick_key_name: [c_uchar; 16], -+ tlsext_tick_hmac_key: [c_uchar; 16], -+ tlsext_tick_aes_key: [c_uchar; 16], -+ tlsext_ticket_key_cb: *mut c_void, -+ tlsext_status_cb: *mut c_void, -+ tlsext_status_arg: *mut c_void, -+ tlsext_opaque_prf_input_callback: *mut c_void, -+ tlsext_opaque_prf_input_callback_arg: *mut c_void, -+ -+ next_protos_advertised_cb: *mut c_void, -+ next_protos_advertised_cb_arg: *mut c_void, -+ next_proto_select_cb: *mut c_void, -+ next_proto_select_cb_arg: *mut c_void, -+ -+ srtp_profiles: *mut c_void, -+ } -+ } else { -+ #[repr(C)] -+ pub struct SSL_CTX { -+ method: *mut c_void, -+ cipher_list: *mut c_void, -+ cipher_list_by_id: *mut c_void, -+ cert_store: *mut c_void, -+ sessions: *mut c_void, -+ session_cache_size: c_ulong, -+ session_cache_head: *mut c_void, -+ session_cache_tail: *mut c_void, -+ session_cache_mode: c_int, -+ session_timeout: c_long, -+ new_session_cb: *mut c_void, -+ remove_session_cb: *mut c_void, -+ get_session_cb: *mut c_void, -+ stats: [c_int; 11], -+ pub references: c_int, -+ app_verify_callback: *mut c_void, -+ app_verify_arg: *mut c_void, -+ default_passwd_callback: *mut c_void, -+ default_passwd_callback_userdata: *mut c_void, -+ client_cert_cb: *mut c_void, -+ app_gen_cookie_cb: *mut c_void, -+ app_verify_cookie_cb: *mut c_void, -+ ex_dat: ::CRYPTO_EX_DATA, -+ rsa_md5: *mut c_void, -+ md5: *mut c_void, -+ sha1: *mut c_void, -+ extra_certs: *mut c_void, -+ comp_methods: *mut c_void, -+ info_callback: *mut c_void, -+ client_CA: *mut c_void, -+ options: c_ulong, -+ mode: c_ulong, -+ max_cert_list: c_long, -+ cert: *mut c_void, -+ read_ahead: c_int, -+ msg_callback: *mut c_void, -+ msg_callback_arg: *mut c_void, -+ verify_mode: c_int, -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; 32], -+ default_verify_callback: *mut c_void, -+ generate_session_id: *mut c_void, -+ param: *mut c_void, -+ quiet_shutdown: c_int, -+ max_send_fragment: c_uint, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_ENGINE"))] -+ client_cert_engine: *mut c_void, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_servername_callback: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsect_servername_arg: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_tick_key_name: [c_uchar; 16], -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_tick_hmac_key: [c_uchar; 16], -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_tick_aes_key: [c_uchar; 16], -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ticket_key_cb: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_status_cb: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_status_arg: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_opaque_prf_input_callback: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_opaque_prf_input_callback_arg: *mut c_void, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_identity_hint: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_client_callback: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_server_callback: *mut c_void, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -+ freelist_max_len: c_uint, -+ #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -+ wbuf_freelist: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_BUF_FREELISTS"))] -+ rbuf_freelist: *mut c_void, -+ -+ #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -+ srp_ctx: SRP_CTX, -+ -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_protos_advertised_cb: *mut c_void, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_protos_advertised_cb_arg: *mut c_void, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_proto_select_cb: *mut c_void, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_NEXTPROTONEG") -+ ))] -+ next_proto_select_cb_arg: *mut c_void, -+ -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl101))] -+ srtp_profiles: *mut c_void, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_select_cb: *mut c_void, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_select_cb_arg: *mut c_void, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_client_proto_list: *mut c_void, -+ #[cfg(all(not(osslconf = "OPENSSL_NO_TLSEXT"), ossl102))] -+ alpn_client_proto_list_len: c_uint, -+ -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC"), -+ ossl102 -+ ))] -+ tlsext_ecpointformatlist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC"), -+ ossl102 -+ ))] -+ tlsext_ecpointformatlist: *mut c_uchar, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC"), -+ ossl102 -+ ))] -+ tlsext_ellipticcurvelist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC"), -+ ossl102 -+ ))] -+ tlsext_ellipticcurvelist: *mut c_uchar, -+ } -+ -+ #[repr(C)] -+ pub struct SRP_CTX { -+ SRP_cb_arg: *mut c_void, -+ TLS_ext_srp_username_callback: *mut c_void, -+ SRP_verify_param_callback: *mut c_void, -+ SRP_give_srp_client_pwd_callback: *mut c_void, -+ login: *mut c_void, -+ N: *mut c_void, -+ g: *mut c_void, -+ s: *mut c_void, -+ B: *mut c_void, -+ A: *mut c_void, -+ a: *mut c_void, -+ b: *mut c_void, -+ v: *mut c_void, -+ info: *mut c_void, -+ stringth: c_int, -+ srp_Mask: c_ulong, -+ } -+ } -+} -+ -+pub enum COMP_METHOD {} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum CRYPTO_EX_DATA {} -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct CRYPTO_EX_DATA { -+ pub sk: *mut ::stack_st_void, -+ } -+ } else { -+ #[repr(C)] -+ pub struct CRYPTO_EX_DATA { -+ pub sk: *mut stack_st_void, -+ pub dummy: c_int, -+ } -+ } -+} -+ -+pub enum OCSP_RESPONSE {} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_pem.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_pem.rs +++ /dev/null @@ -1,140 +0,0 @@ ---- src/vendor/openssl-sys/src/pem.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/pem.rs -@@ -0,0 +1,137 @@ -+use libc::*; -+ -+use *; -+ -+pub type pem_password_cb = -+ Option c_int>; -+ -+extern "C" { -+ pub fn PEM_read_bio_X509( -+ bio: *mut BIO, -+ out: *mut *mut X509, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut X509; -+ pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int; -+ pub fn PEM_read_bio_X509_REQ( -+ bio: *mut BIO, -+ out: *mut *mut X509_REQ, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut X509_REQ; -+ pub fn PEM_write_bio_X509_REQ(bio: *mut BIO, x509: *mut X509_REQ) -> c_int; -+ pub fn PEM_read_bio_RSAPrivateKey( -+ bio: *mut BIO, -+ rsa: *mut *mut RSA, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut RSA; -+ pub fn PEM_write_bio_RSAPrivateKey( -+ bp: *mut BIO, -+ rsa: *mut RSA, -+ cipher: *const EVP_CIPHER, -+ kstr: *mut c_uchar, -+ klen: c_int, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> c_int; -+ pub fn PEM_read_bio_RSAPublicKey( -+ bio: *mut BIO, -+ rsa: *mut *mut RSA, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut RSA; -+ pub fn PEM_write_bio_RSAPublicKey(bp: *mut BIO, rsa: *const RSA) -> c_int; -+ pub fn PEM_read_bio_RSA_PUBKEY( -+ bio: *mut BIO, -+ rsa: *mut *mut RSA, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut RSA; -+ pub fn PEM_write_bio_RSA_PUBKEY(bp: *mut BIO, rsa: *mut RSA) -> c_int; -+ pub fn PEM_read_bio_DSAPrivateKey( -+ bp: *mut BIO, -+ dsa: *mut *mut DSA, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut DSA; -+ pub fn PEM_write_bio_DSAPrivateKey( -+ bp: *mut BIO, -+ dsa: *mut DSA, -+ cipher: *const EVP_CIPHER, -+ kstr: *mut c_uchar, -+ klen: c_int, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> c_int; -+ pub fn PEM_read_bio_DSA_PUBKEY( -+ bp: *mut BIO, -+ dsa: *mut *mut DSA, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut DSA; -+ pub fn PEM_write_bio_DSA_PUBKEY(bp: *mut BIO, dsa: *mut DSA) -> c_int; -+ pub fn PEM_read_bio_ECPrivateKey( -+ bio: *mut BIO, -+ key: *mut *mut EC_KEY, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut EC_KEY; -+ pub fn PEM_write_bio_ECPrivateKey( -+ bio: *mut BIO, -+ key: *mut EC_KEY, -+ cipher: *const EVP_CIPHER, -+ kstr: *mut c_uchar, -+ klen: c_int, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> c_int; -+ pub fn PEM_read_bio_DHparams( -+ bio: *mut BIO, -+ out: *mut *mut DH, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut DH; -+ pub fn PEM_write_bio_DHparams(bio: *mut BIO, x: *const DH) -> c_int; -+ pub fn PEM_read_bio_PrivateKey( -+ bio: *mut BIO, -+ out: *mut *mut EVP_PKEY, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut EVP_PKEY; -+ pub fn PEM_write_bio_PrivateKey( -+ bio: *mut BIO, -+ pkey: *mut EVP_PKEY, -+ cipher: *const EVP_CIPHER, -+ kstr: *mut c_uchar, -+ klen: c_int, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> c_int; -+ pub fn PEM_read_bio_PUBKEY( -+ bio: *mut BIO, -+ out: *mut *mut EVP_PKEY, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> *mut EVP_PKEY; -+ pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int; -+ -+ pub fn PEM_write_bio_PKCS8PrivateKey( -+ bio: *mut BIO, -+ pkey: *mut EVP_PKEY, -+ cipher: *const EVP_CIPHER, -+ kstr: *mut c_char, -+ klen: c_int, -+ callback: pem_password_cb, -+ user_data: *mut c_void, -+ ) -> c_int; -+ pub fn d2i_PKCS8PrivateKey_bio( -+ bp: *mut BIO, -+ x: *mut *mut EVP_PKEY, -+ cb: pem_password_cb, -+ u: *mut c_void, -+ ) -> *mut EVP_PKEY; -+} -+ -+pub const PEM_R_NO_START_LINE: c_int = 108; Index: lang/rust/files/patch-src_vendor_openssl-sys_src_pkcs12.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_pkcs12.rs +++ /dev/null @@ -1,59 +0,0 @@ ---- src/vendor/openssl-sys/src/pkcs12.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/pkcs12.rs -@@ -0,0 +1,56 @@ -+use libc::*; -+ -+use *; -+ -+pub enum PKCS12 {} -+ -+extern "C" { -+ pub fn PKCS12_free(p12: *mut PKCS12); -+ pub fn i2d_PKCS12(a: *mut PKCS12, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_PKCS12(a: *mut *mut PKCS12, pp: *mut *const u8, length: c_long) -> *mut PKCS12; -+ -+ pub fn PKCS12_parse( -+ p12: *mut PKCS12, -+ pass: *const c_char, -+ pkey: *mut *mut EVP_PKEY, -+ cert: *mut *mut X509, -+ ca: *mut *mut stack_st_X509, -+ ) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn PKCS12_create( -+ pass: *const c_char, -+ friendly_name: *const c_char, -+ pkey: *mut EVP_PKEY, -+ cert: *mut X509, -+ ca: *mut stack_st_X509, -+ nid_key: c_int, -+ nid_cert: c_int, -+ iter: c_int, -+ mac_iter: c_int, -+ keytype: c_int, -+ ) -> *mut PKCS12; -+ } -+ } else { -+ extern "C" { -+ pub fn PKCS12_create( -+ pass: *mut c_char, -+ friendly_name: *mut c_char, -+ pkey: *mut EVP_PKEY, -+ cert: *mut X509, -+ ca: *mut stack_st_X509, -+ nid_key: c_int, -+ nid_cert: c_int, -+ iter: c_int, -+ mac_iter: c_int, -+ keytype: c_int, -+ ) -> *mut PKCS12; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn i2d_PKCS12_bio(b: *mut BIO, a: *mut PKCS12) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_rand.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_rand.rs +++ /dev/null @@ -1,9 +0,0 @@ ---- src/vendor/openssl-sys/src/rand.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/rand.rs -@@ -0,0 +1,6 @@ -+use libc::*; -+ -+extern "C" { -+ pub fn RAND_bytes(buf: *mut u8, num: c_int) -> c_int; -+ pub fn RAND_status() -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_rsa.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_rsa.rs +++ /dev/null @@ -1,181 +0,0 @@ ---- src/vendor/openssl-sys/src/rsa.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/rsa.rs -@@ -0,0 +1,178 @@ -+use libc::*; -+use std::ptr; -+ -+use *; -+ -+pub const RSA_F4: c_long = 0x10001; -+ -+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, -+ EVP_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, -+ EVP_PKEY_CTRL_GET_RSA_PADDING, -+ 0, -+ ppad as *mut c_void, -+ ) -+} -+ -+pub unsafe fn EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx: *mut EVP_PKEY_CTX, len: c_int) -> c_int { -+ EVP_PKEY_CTX_ctrl( -+ ctx, -+ EVP_PKEY_RSA, -+ EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY, -+ EVP_PKEY_CTRL_RSA_PSS_SALTLEN, -+ len, -+ ptr::null_mut(), -+ ) -+} -+ -+pub unsafe fn EVP_PKEY_CTX_set_rsa_mgf1_md(ctx: *mut EVP_PKEY_CTX, md: *mut EVP_MD) -> c_int { -+ EVP_PKEY_CTX_ctrl( -+ ctx, -+ EVP_PKEY_RSA, -+ EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, -+ EVP_PKEY_CTRL_RSA_MGF1_MD, -+ 0, -+ md as *mut c_void, -+ ) -+} -+ -+pub const EVP_PKEY_CTRL_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 1; -+pub const EVP_PKEY_CTRL_RSA_PSS_SALTLEN: c_int = EVP_PKEY_ALG_CTRL + 2; -+ -+pub const EVP_PKEY_CTRL_RSA_MGF1_MD: c_int = EVP_PKEY_ALG_CTRL + 5; -+ -+pub const EVP_PKEY_CTRL_GET_RSA_PADDING: c_int = EVP_PKEY_ALG_CTRL + 6; -+ -+pub const RSA_PKCS1_PADDING: c_int = 1; -+pub const RSA_SSLV23_PADDING: c_int = 2; -+pub const RSA_NO_PADDING: c_int = 3; -+pub const RSA_PKCS1_OAEP_PADDING: c_int = 4; -+pub const RSA_X931_PADDING: c_int = 5; -+pub const RSA_PKCS1_PSS_PADDING: c_int = 6; -+ -+extern "C" { -+ pub fn RSA_new() -> *mut RSA; -+ pub fn RSA_size(k: *const RSA) -> c_int; -+ -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_set0_key( -+ r: *mut ::RSA, -+ n: *mut ::BIGNUM, -+ e: *mut ::BIGNUM, -+ d: *mut ::BIGNUM, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_set0_factors(r: *mut ::RSA, p: *mut ::BIGNUM, q: *mut ::BIGNUM) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_set0_crt_params( -+ r: *mut ::RSA, -+ dmp1: *mut ::BIGNUM, -+ dmq1: *mut ::BIGNUM, -+ iqmp: *mut ::BIGNUM, -+ ) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_get0_key( -+ r: *const ::RSA, -+ n: *mut *const ::BIGNUM, -+ e: *mut *const ::BIGNUM, -+ d: *mut *const ::BIGNUM, -+ ); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_get0_factors(r: *const ::RSA, p: *mut *const ::BIGNUM, q: *mut *const ::BIGNUM); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn RSA_get0_crt_params( -+ r: *const ::RSA, -+ dmp1: *mut *const ::BIGNUM, -+ dmq1: *mut *const ::BIGNUM, -+ iqmp: *mut *const ::BIGNUM, -+ ); -+ -+ #[cfg(not(ossl110))] -+ pub fn RSA_generate_key( -+ modsz: c_int, -+ e: c_ulong, -+ cb: Option, -+ cbarg: *mut c_void, -+ ) -> *mut RSA; -+ -+ pub fn RSA_generate_key_ex( -+ rsa: *mut RSA, -+ bits: c_int, -+ e: *mut BIGNUM, -+ cb: *mut BN_GENCB, -+ ) -> c_int; -+ -+ pub fn RSA_public_encrypt( -+ flen: c_int, -+ from: *const u8, -+ to: *mut u8, -+ k: *mut RSA, -+ pad: c_int, -+ ) -> c_int; -+ pub fn RSA_private_encrypt( -+ flen: c_int, -+ from: *const u8, -+ to: *mut u8, -+ k: *mut RSA, -+ pad: c_int, -+ ) -> c_int; -+ pub fn RSA_public_decrypt( -+ flen: c_int, -+ from: *const u8, -+ to: *mut u8, -+ k: *mut RSA, -+ pad: c_int, -+ ) -> c_int; -+ pub fn RSA_private_decrypt( -+ flen: c_int, -+ from: *const u8, -+ to: *mut u8, -+ k: *mut RSA, -+ pad: c_int, -+ ) -> c_int; -+ pub fn RSA_free(rsa: *mut RSA); -+ pub fn RSA_up_ref(rsa: *mut RSA) -> c_int; -+ -+ pub fn i2d_RSAPublicKey(k: *const RSA, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_RSAPublicKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -+ pub fn i2d_RSAPrivateKey(k: *const RSA, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_RSAPrivateKey(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -+ -+ pub fn RSA_sign( -+ t: c_int, -+ m: *const u8, -+ mlen: c_uint, -+ sig: *mut u8, -+ siglen: *mut c_uint, -+ k: *mut RSA, -+ ) -> c_int; -+ pub fn RSA_verify( -+ t: c_int, -+ m: *const u8, -+ mlen: c_uint, -+ sig: *const u8, -+ siglen: c_uint, -+ k: *mut RSA, -+ ) -> c_int; -+ -+ pub fn RSA_padding_check_PKCS1_type_2( -+ to: *mut c_uchar, -+ tlen: c_int, -+ f: *const c_uchar, -+ fl: c_int, -+ rsa_len: c_int, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_safestack.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_safestack.rs +++ /dev/null @@ -1,4 +0,0 @@ ---- src/vendor/openssl-sys/src/safestack.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/safestack.rs -@@ -0,0 +1 @@ -+stack!(stack_st_OPENSSL_STRING); Index: lang/rust/files/patch-src_vendor_openssl-sys_src_sha.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_sha.rs +++ /dev/null @@ -1,73 +0,0 @@ ---- src/vendor/openssl-sys/src/sha.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/sha.rs -@@ -0,0 +1,70 @@ -+use libc::*; -+ -+pub type SHA_LONG = c_uint; -+ -+pub const SHA_LBLOCK: c_int = 16; -+ -+#[repr(C)] -+pub struct SHA_CTX { -+ pub h0: SHA_LONG, -+ pub h1: SHA_LONG, -+ pub h2: SHA_LONG, -+ pub h3: SHA_LONG, -+ pub h4: SHA_LONG, -+ pub Nl: SHA_LONG, -+ pub Nh: SHA_LONG, -+ pub data: [SHA_LONG; SHA_LBLOCK as usize], -+ pub num: c_uint, -+} -+ -+extern "C" { -+ pub fn SHA1_Init(c: *mut SHA_CTX) -> c_int; -+ pub fn SHA1_Update(c: *mut SHA_CTX, data: *const c_void, len: size_t) -> c_int; -+ pub fn SHA1_Final(md: *mut c_uchar, c: *mut SHA_CTX) -> c_int; -+ pub fn SHA1(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -+} -+ -+#[repr(C)] -+pub struct SHA256_CTX { -+ pub h: [SHA_LONG; 8], -+ pub Nl: SHA_LONG, -+ pub Nh: SHA_LONG, -+ pub data: [SHA_LONG; SHA_LBLOCK as usize], -+ pub num: c_uint, -+ pub md_len: c_uint, -+} -+ -+extern "C" { -+ pub fn SHA224_Init(c: *mut SHA256_CTX) -> c_int; -+ pub fn SHA224_Update(c: *mut SHA256_CTX, data: *const c_void, len: size_t) -> c_int; -+ pub fn SHA224_Final(md: *mut c_uchar, c: *mut SHA256_CTX) -> c_int; -+ pub fn SHA224(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -+ pub fn SHA256_Init(c: *mut SHA256_CTX) -> c_int; -+ pub fn SHA256_Update(c: *mut SHA256_CTX, data: *const c_void, len: size_t) -> c_int; -+ pub fn SHA256_Final(md: *mut c_uchar, c: *mut SHA256_CTX) -> c_int; -+ pub fn SHA256(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -+} -+ -+pub type SHA_LONG64 = u64; -+ -+#[repr(C)] -+pub struct SHA512_CTX { -+ pub h: [SHA_LONG64; 8], -+ pub Nl: SHA_LONG64, -+ pub Nh: SHA_LONG64, -+ // this is a union but we don't want to require 1.19 -+ u: [SHA_LONG64; SHA_LBLOCK as usize], -+ pub num: c_uint, -+ pub md_len: c_uint, -+} -+ -+extern "C" { -+ pub fn SHA384_Init(c: *mut SHA512_CTX) -> c_int; -+ pub fn SHA384_Update(c: *mut SHA512_CTX, data: *const c_void, len: size_t) -> c_int; -+ pub fn SHA384_Final(md: *mut c_uchar, c: *mut SHA512_CTX) -> c_int; -+ pub fn SHA384(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -+ pub fn SHA512_Init(c: *mut SHA512_CTX) -> c_int; -+ pub fn SHA512_Update(c: *mut SHA512_CTX, data: *const c_void, len: size_t) -> c_int; -+ pub fn SHA512_Final(md: *mut c_uchar, c: *mut SHA512_CTX) -> c_int; -+ pub fn SHA512(d: *const c_uchar, n: size_t, md: *mut c_uchar) -> *mut c_uchar; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_srtp.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_srtp.rs +++ /dev/null @@ -1,21 +0,0 @@ ---- src/vendor/openssl-sys/src/srtp.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/srtp.rs -@@ -0,0 +1,18 @@ -+use libc::*; -+ -+use *; -+ -+pub const SRTP_AES128_CM_SHA1_80: c_ulong = 0x0001; -+pub const SRTP_AES128_CM_SHA1_32: c_ulong = 0x0002; -+pub const SRTP_AES128_F8_SHA1_80: c_ulong = 0x0003; -+pub const SRTP_AES128_F8_SHA1_32: c_ulong = 0x0004; -+pub const SRTP_NULL_SHA1_80: c_ulong = 0x0005; -+pub const SRTP_NULL_SHA1_32: c_ulong = 0x0006; -+ -+extern "C" { -+ pub fn SSL_CTX_set_tlsext_use_srtp(ctx: *mut SSL_CTX, profiles: *const c_char) -> c_int; -+ pub fn SSL_set_tlsext_use_srtp(ssl: *mut SSL, profiles: *const c_char) -> c_int; -+ -+ pub fn SSL_get_srtp_profiles(ssl: *mut SSL) -> *mut stack_st_SRTP_PROTECTION_PROFILE; -+ pub fn SSL_get_selected_srtp_profile(ssl: *mut SSL) -> *mut SRTP_PROTECTION_PROFILE; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_ssl.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_ssl.rs +++ /dev/null @@ -1,1232 +0,0 @@ ---- src/vendor/openssl-sys/src/ssl.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/ssl.rs -@@ -0,0 +1,1229 @@ -+use libc::*; -+use std::ptr; -+ -+use *; -+ -+#[cfg(not(any(libressl, ossl110)))] -+pub const SSL_MAX_KRB5_PRINCIPAL_LENGTH: c_int = 256; -+ -+#[cfg(not(ossl110))] -+pub const SSL_MAX_SSL_SESSION_ID_LENGTH: c_int = 32; -+#[cfg(not(ossl110))] -+pub const SSL_MAX_SID_CTX_LENGTH: c_int = 32; -+ -+#[cfg(not(any(libressl, ossl110)))] -+pub const SSL_MAX_KEY_ARG_LENGTH: c_int = 8; -+#[cfg(not(ossl110))] -+pub const SSL_MAX_MASTER_KEY_LENGTH: c_int = 48; -+ -+pub const SSL_SENT_SHUTDOWN: c_int = 1; -+pub const SSL_RECEIVED_SHUTDOWN: c_int = 2; -+ -+pub const SSL_FILETYPE_PEM: c_int = X509_FILETYPE_PEM; -+pub const SSL_FILETYPE_ASN1: c_int = X509_FILETYPE_ASN1; -+ -+pub enum SSL_METHOD {} -+pub enum SSL_CIPHER {} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ pub enum SSL_SESSION {} -+ } else if #[cfg(libressl251)] { -+ #[repr(C)] -+ pub struct SSL_SESSION { -+ ssl_version: c_int, -+ pub master_key_length: c_int, -+ pub master_key: [c_uchar; 48], -+ session_id_length: c_uint, -+ session_id: [c_uchar; ::SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; ::SSL_MAX_SID_CTX_LENGTH as usize], -+ peer: *mut ::X509, -+ verify_result: c_long, -+ timeout: c_long, -+ time: time_t, -+ pub references: c_int, -+ cipher: *const ::SSL_CIPHER, -+ cipher_id: c_long, -+ ciphers: *mut stack_st_SSL_CIPHER, -+ tlsext_hostname: *mut c_char, -+ tlsext_tick: *mut c_uchar, -+ tlsext_ticklen: size_t, -+ tlsext_tick_lifetime_int: c_long, -+ internal: *mut c_void, -+ } -+ } else if #[cfg(libressl)] { -+ #[repr(C)] -+ pub struct SSL_SESSION { -+ ssl_version: c_int, -+ pub master_key_length: c_int, -+ pub master_key: [c_uchar; 48], -+ session_id_length: c_uint, -+ session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize], -+ not_resumable: c_int, -+ sess_cert: *mut c_void, -+ peer: *mut X509, -+ verify_result: c_long, -+ timeout: c_long, -+ time: time_t, -+ pub references: c_int, -+ cipher: *const c_void, -+ cipher_id: c_ulong, -+ ciphers: *mut c_void, -+ ex_data: ::CRYPTO_EX_DATA, -+ prev: *mut c_void, -+ next: *mut c_void, -+ tlsext_hostname: *mut c_char, -+ tlsext_ecpointformatlist_length: size_t, -+ tlsext_ecpointformatlist: *mut u8, -+ tlsext_ellipticcurvelist_length: size_t, -+ tlsext_ellipticcurvelist: *mut u16, -+ tlsext_tick: *mut c_uchar, -+ tlsext_ticklen: size_t, -+ tlsext_tick_lifetime_hint: c_long, -+ } -+ } else { -+ #[repr(C)] -+ pub struct SSL_SESSION { -+ ssl_version: c_int, -+ key_arg_length: c_uint, -+ key_arg: [c_uchar; SSL_MAX_KEY_ARG_LENGTH as usize], -+ pub master_key_length: c_int, -+ pub master_key: [c_uchar; 48], -+ session_id_length: c_uint, -+ session_id: [c_uchar; SSL_MAX_SSL_SESSION_ID_LENGTH as usize], -+ sid_ctx_length: c_uint, -+ sid_ctx: [c_uchar; SSL_MAX_SID_CTX_LENGTH as usize], -+ #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -+ krb5_client_princ_len: c_uint, -+ #[cfg(not(osslconf = "OPENSSL_NO_KRB5"))] -+ krb5_client_princ: [c_uchar; SSL_MAX_KRB5_PRINCIPAL_LENGTH as usize], -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_identity_hint: *mut c_char, -+ #[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+ psk_identity: *mut c_char, -+ not_resumable: c_int, -+ sess_cert: *mut c_void, -+ peer: *mut X509, -+ verify_result: c_long, -+ pub references: c_int, -+ timeout: c_long, -+ time: c_long, -+ compress_meth: c_uint, -+ cipher: *const c_void, -+ cipher_id: c_ulong, -+ ciphers: *mut c_void, -+ ex_data: ::CRYPTO_EX_DATA, -+ prev: *mut c_void, -+ next: *mut c_void, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_hostname: *mut c_char, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ecpointformatlist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ecpointformatlist: *mut c_uchar, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ellipticcurvelist_length: size_t, -+ #[cfg(all( -+ not(osslconf = "OPENSSL_NO_TLSEXT"), -+ not(osslconf = "OPENSSL_NO_EC") -+ ))] -+ tlsext_ellipticcurvelist: *mut c_uchar, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_tick: *mut c_uchar, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_ticklen: size_t, -+ #[cfg(not(osslconf = "OPENSSL_NO_TLSEXT"))] -+ tlsext_tick_lifetime_hint: c_long, -+ #[cfg(not(osslconf = "OPENSSL_NO_SRP"))] -+ srp_username: *mut c_char, -+ } -+ } -+} -+ -+stack!(stack_st_SSL_CIPHER); -+ -+#[repr(C)] -+pub struct SRTP_PROTECTION_PROFILE { -+ pub name: *const c_char, -+ pub id: c_ulong, -+} -+ -+stack!(stack_st_SRTP_PROTECTION_PROFILE); -+ -+pub type tls_session_ticket_ext_cb_fn = -+ Option c_int>; -+pub type tls_session_secret_cb_fn = Option< -+ unsafe extern "C" fn( -+ *mut SSL, -+ *mut c_void, -+ *mut c_int, -+ *mut stack_st_SSL_CIPHER, -+ *mut *mut SSL_CIPHER, -+ *mut c_void, -+ ) -> c_int, -+>; -+ -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS_ONLY: c_uint = 0x0001; -+/* This extension is only allowed in DTLS */ -+#[cfg(ossl111)] -+pub const SSL_EXT_DTLS_ONLY: c_uint = 0x0002; -+/* Some extensions may be allowed in DTLS but we don't implement them for it */ -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS_IMPLEMENTATION_ONLY: c_uint = 0x0004; -+/* Most extensions are not defined for SSLv3 but EXT_TYPE_renegotiate is */ -+#[cfg(ossl111)] -+pub const SSL_EXT_SSL3_ALLOWED: c_uint = 0x0008; -+/* Extension is only defined for TLS1.2 and below */ -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_2_AND_BELOW_ONLY: c_uint = 0x0010; -+/* Extension is only defined for TLS1.3 and above */ -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_ONLY: c_uint = 0x0020; -+/* Ignore this extension during parsing if we are resuming */ -+#[cfg(ossl111)] -+pub const SSL_EXT_IGNORE_ON_RESUMPTION: c_uint = 0x0040; -+#[cfg(ossl111)] -+pub const SSL_EXT_CLIENT_HELLO: c_uint = 0x0080; -+/* Really means TLS1.2 or below */ -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_2_SERVER_HELLO: c_uint = 0x0100; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_SERVER_HELLO: c_uint = 0x0200; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS: c_uint = 0x0400; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST: c_uint = 0x0800; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_CERTIFICATE: c_uint = 0x1000; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_NEW_SESSION_TICKET: c_uint = 0x2000; -+#[cfg(ossl111)] -+pub const SSL_EXT_TLS1_3_CERTIFICATE_REQUEST: c_uint = 0x4000; -+ -+#[cfg(ossl111)] -+pub type SSL_custom_ext_add_cb_ex = Option< -+ unsafe extern "C" fn( -+ ssl: *mut ::SSL, -+ ext_type: c_uint, -+ context: c_uint, -+ out: *mut *const c_uchar, -+ outlen: *mut size_t, -+ x: *mut ::X509, -+ chainidx: size_t, -+ al: *mut c_int, -+ add_arg: *mut c_void, -+ ) -> c_int, -+>; -+ -+#[cfg(ossl111)] -+pub type SSL_custom_ext_free_cb_ex = Option< -+ unsafe extern "C" fn( -+ ssl: *mut ::SSL, -+ ext_type: c_uint, -+ context: c_uint, -+ out: *mut *const c_uchar, -+ add_arg: *mut c_void, -+ ), -+>; -+ -+#[cfg(ossl111)] -+pub type SSL_custom_ext_parse_cb_ex = Option< -+ unsafe extern "C" fn( -+ ssl: *mut ::SSL, -+ ext_type: c_uint, -+ context: c_uint, -+ input: *const c_uchar, -+ inlen: size_t, -+ x: *mut ::X509, -+ chainidx: size_t, -+ al: *mut c_int, -+ parse_arg: *mut c_void, -+ ) -> c_int, -+>; -+ -+pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004; -+cfg_if! { -+ if #[cfg(libressl261)] { -+ pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x0; -+ } else if #[cfg(any(ossl102, libressl))] { -+ pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x10; -+ } -+} -+#[cfg(ossl101)] -+pub const SSL_OP_SAFARI_ECDHE_ECDSA_BUG: c_ulong = 0x00000040; -+ -+pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800; -+ -+pub const SSL_OP_NO_QUERY_MTU: c_ulong = 0x00001000; -+pub const SSL_OP_COOKIE_EXCHANGE: c_ulong = 0x00002000; -+pub const SSL_OP_NO_TICKET: c_ulong = 0x00004000; -+cfg_if! { -+ if #[cfg(ossl101)] { -+ pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x00008000; -+ } else { -+ pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0; -+ } -+} -+ -+pub const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: c_ulong = 0x00010000; -+cfg_if! { -+ if #[cfg(ossl101)] { -+ pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x00020000; -+ pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x00040000; -+ } else { -+ pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0; -+ pub const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: c_ulong = 0x0; -+ } -+} -+ -+#[cfg(ossl111)] -+pub const SSL_OP_ENABLE_MIDDLEBOX_COMPAT: c_ulong = 0x00100000; -+ -+pub const SSL_OP_CIPHER_SERVER_PREFERENCE: c_ulong = 0x00400000; -+cfg_if! { -+ if #[cfg(libressl280)] { -+ pub const SSL_OP_TLS_ROLLBACK_BUG: c_ulong = 0; -+ } else { -+ pub const SSL_OP_TLS_ROLLBACK_BUG: c_ulong = 0x00800000; -+ } -+} -+ -+ -+cfg_if! { -+ if #[cfg(ossl101)] { -+ pub const SSL_OP_NO_SSLv3: c_ulong = 0x02000000; -+ } else { -+ pub const SSL_OP_NO_SSLv3: c_ulong = 0x0; -+ } -+} -+pub const SSL_OP_NO_TLSv1_1: c_ulong = 0x10000000; -+pub const SSL_OP_NO_TLSv1_2: c_ulong = 0x08000000; -+ -+pub const SSL_OP_NO_TLSv1: c_ulong = 0x04000000; -+#[cfg(ossl102)] -+pub const SSL_OP_NO_DTLSv1: c_ulong = 0x04000000; -+#[cfg(ossl102)] -+pub const SSL_OP_NO_DTLSv1_2: c_ulong = 0x08000000; -+#[cfg(ossl111)] -+pub const SSL_OP_NO_TLSv1_3: c_ulong = 0x20000000; -+ -+cfg_if! { -+ if #[cfg(ossl111)] { -+ pub const SSL_OP_NO_SSL_MASK: c_ulong = SSL_OP_NO_SSLv2 -+ | SSL_OP_NO_SSLv3 -+ | SSL_OP_NO_TLSv1 -+ | SSL_OP_NO_TLSv1_1 -+ | SSL_OP_NO_TLSv1_2 -+ | SSL_OP_NO_TLSv1_3; -+ } else if #[cfg(ossl102)] { -+ pub const SSL_OP_NO_SSL_MASK: c_ulong = -+ SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2; -+ } -+} -+ -+cfg_if! { -+ if #[cfg(libressl261)] { -+ pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x0; -+ } else { -+ pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000; -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110f)] { -+ pub const SSL_OP_ALL: c_ulong = SSL_OP_CRYPTOPRO_TLSEXT_BUG -+ | SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS -+ | SSL_OP_LEGACY_SERVER_CONNECT -+ | SSL_OP_TLSEXT_PADDING -+ | SSL_OP_SAFARI_ECDHE_ECDSA_BUG; -+ } else if #[cfg(libressl261)] { -+ pub const SSL_OP_ALL: c_ulong = 0x4; -+ } else if #[cfg(libressl)] { -+ pub const SSL_OP_ALL: c_ulong = 0x80000014; -+ } else { -+ pub const SSL_OP_ALL: c_ulong = 0x80000BFF; -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000000; -+ pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000000; -+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00000000; -+ pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00000000; -+ pub const SSL_OP_NO_SSLv2: c_ulong = 0x00000000; -+ } else if #[cfg(ossl101)] { -+ pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000001; -+ pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x00000002; -+ pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x00000008; -+ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x00000020; -+ pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x00000080; -+ pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x00000100; -+ pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x00000200; -+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000; -+ pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000; -+ pub const SSL_OP_NO_SSLv2: c_ulong = 0x01000000; -+ } else { -+ pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x0; -+ pub const SSL_OP_NETSCAPE_CHALLENGE_BUG: c_ulong = 0x0; -+ pub const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: c_ulong = 0x0; -+ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x0; -+ pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0; -+ pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0; -+ pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0; -+ #[cfg(libressl261)] -+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x0; -+ #[cfg(not(libressl261))] -+ pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000; -+ pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000; -+ pub const SSL_OP_NO_SSLv2: c_ulong = 0x0; -+ } -+} -+ -+pub const SSL_MODE_ENABLE_PARTIAL_WRITE: c_long = 0x1; -+pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: c_long = 0x2; -+pub const SSL_MODE_AUTO_RETRY: c_long = 0x4; -+pub const SSL_MODE_NO_AUTO_CHAIN: c_long = 0x8; -+pub const SSL_MODE_RELEASE_BUFFERS: c_long = 0x10; -+#[cfg(ossl101)] -+pub const SSL_MODE_SEND_CLIENTHELLO_TIME: c_long = 0x20; -+#[cfg(ossl101)] -+pub const SSL_MODE_SEND_SERVERHELLO_TIME: c_long = 0x40; -+#[cfg(ossl101)] -+pub const SSL_MODE_SEND_FALLBACK_SCSV: c_long = 0x80; -+ -+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()) -+} -+ -+#[cfg(ossl111)] -+pub const SSL_COOKIE_LENGTH: c_int = 4096; -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> c_ulong; -+ pub fn SSL_CTX_set_options(ctx: *mut SSL_CTX, op: c_ulong) -> c_ulong; -+ pub fn SSL_CTX_clear_options(ctx: *mut SSL_CTX, op: c_ulong) -> c_ulong; -+ } -+ } else { -+ pub unsafe fn SSL_CTX_get_options(ctx: *const SSL_CTX) -> c_ulong { -+ SSL_CTX_ctrl(ctx as *mut _, SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong -+ } -+ -+ pub unsafe fn SSL_CTX_set_options(ctx: *const SSL_CTX, op: c_ulong) -> c_ulong { -+ SSL_CTX_ctrl( -+ ctx as *mut _, -+ SSL_CTRL_OPTIONS, -+ op as c_long, -+ ptr::null_mut(), -+ ) as c_ulong -+ } -+ -+ pub unsafe fn SSL_CTX_clear_options(ctx: *const SSL_CTX, op: c_ulong) -> c_ulong { -+ SSL_CTX_ctrl( -+ ctx as *mut _, -+ SSL_CTRL_CLEAR_OPTIONS, -+ op as c_long, -+ ptr::null_mut(), -+ ) as c_ulong -+ } -+ } -+} -+ -+pub type GEN_SESSION_CB = -+ Option c_int>; -+ -+pub const SSL_SESS_CACHE_OFF: c_long = 0x0; -+pub const SSL_SESS_CACHE_CLIENT: c_long = 0x1; -+pub const SSL_SESS_CACHE_SERVER: c_long = 0x2; -+pub const SSL_SESS_CACHE_BOTH: c_long = SSL_SESS_CACHE_CLIENT | SSL_SESS_CACHE_SERVER; -+pub const SSL_SESS_CACHE_NO_AUTO_CLEAR: c_long = 0x80; -+pub const SSL_SESS_CACHE_NO_INTERNAL_LOOKUP: c_long = 0x100; -+pub const SSL_SESS_CACHE_NO_INTERNAL_STORE: c_long = 0x200; -+pub const SSL_SESS_CACHE_NO_INTERNAL: c_long = -+ SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | SSL_SESS_CACHE_NO_INTERNAL_STORE; -+ -+extern "C" { -+ pub fn SSL_CTX_sess_set_new_cb( -+ ctx: *mut SSL_CTX, -+ new_session_cb: Option c_int>, -+ ); -+ pub fn SSL_CTX_sess_set_remove_cb( -+ ctx: *mut SSL_CTX, -+ remove_session_cb: Option, -+ ); -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn SSL_CTX_sess_set_get_cb( -+ ctx: *mut ::SSL_CTX, -+ get_session_cb: Option< -+ unsafe extern "C" fn(*mut ::SSL, *const c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, -+ >, -+ ); -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_CTX_sess_set_get_cb( -+ ctx: *mut ::SSL_CTX, -+ get_session_cb: Option< -+ unsafe extern "C" fn(*mut ::SSL, *mut c_uchar, c_int, *mut c_int) -> *mut SSL_SESSION, -+ >, -+ ); -+ } -+ } -+} -+extern "C" { -+ // FIXME change to unsafe extern "C" fn -+ pub fn SSL_CTX_set_cookie_generate_cb( -+ s: *mut SSL_CTX, -+ cb: Option< -+ extern "C" fn(ssl: *mut SSL, cookie: *mut c_uchar, cookie_len: *mut c_uint) -> c_int, -+ >, -+ ); -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn SSL_CTX_set_cookie_verify_cb( -+ s: *mut SSL_CTX, -+ cb: Option< -+ extern "C" fn(ssl: *mut SSL, cookie: *const c_uchar, cookie_len: c_uint) -> c_int, -+ >, -+ ); -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_CTX_set_cookie_verify_cb( -+ s: *mut SSL_CTX, -+ cb: Option c_int>, -+ ); -+ } -+ } -+} -+ -+extern "C" { -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_set_stateless_cookie_generate_cb( -+ s: *mut SSL_CTX, -+ cb: Option< -+ unsafe extern "C" fn(ssl: *mut SSL, cookie: *mut c_uchar, cookie_len: *mut size_t) -+ -> c_int, -+ >, -+ ); -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_set_stateless_cookie_verify_cb( -+ s: *mut SSL_CTX, -+ cb: Option< -+ unsafe extern "C" fn(ssl: *mut SSL, cookie: *const c_uchar, cookie_len: size_t) -+ -> c_int, -+ >, -+ ); -+ -+ pub fn SSL_CTX_set_next_protos_advertised_cb( -+ ssl: *mut SSL_CTX, -+ cb: extern "C" fn( -+ ssl: *mut SSL, -+ out: *mut *const c_uchar, -+ outlen: *mut c_uint, -+ arg: *mut c_void, -+ ) -> c_int, -+ arg: *mut c_void, -+ ); -+ pub fn SSL_CTX_set_next_proto_select_cb( -+ ssl: *mut SSL_CTX, -+ cb: extern "C" fn( -+ ssl: *mut SSL, -+ out: *mut *mut c_uchar, -+ outlen: *mut c_uchar, -+ inbuf: *const c_uchar, -+ inlen: c_uint, -+ arg: *mut c_void, -+ ) -> c_int, -+ arg: *mut c_void, -+ ); -+ pub fn SSL_get0_next_proto_negotiated( -+ s: *const SSL, -+ data: *mut *const c_uchar, -+ len: *mut c_uint, -+ ); -+ -+ pub fn SSL_select_next_proto( -+ out: *mut *mut c_uchar, -+ outlen: *mut c_uchar, -+ inbuf: *const c_uchar, -+ inlen: c_uint, -+ client: *const c_uchar, -+ client_len: c_uint, -+ ) -> c_int; -+} -+ -+pub const OPENSSL_NPN_UNSUPPORTED: c_int = 0; -+pub const OPENSSL_NPN_NEGOTIATED: c_int = 1; -+pub const OPENSSL_NPN_NO_OVERLAP: c_int = 2; -+ -+extern "C" { -+ #[cfg(any(ossl102, libressl261))] -+ pub fn SSL_CTX_set_alpn_protos(s: *mut SSL_CTX, data: *const c_uchar, len: c_uint) -> c_int; -+ #[cfg(any(ossl102, libressl261))] -+ pub fn SSL_set_alpn_protos(s: *mut SSL, data: *const c_uchar, len: c_uint) -> c_int; -+ // FIXME should take an Option -+ #[cfg(any(ossl102, libressl261))] -+ pub fn SSL_CTX_set_alpn_select_cb( -+ ssl: *mut SSL_CTX, -+ cb: extern "C" fn( -+ ssl: *mut SSL, -+ out: *mut *const c_uchar, -+ outlen: *mut c_uchar, -+ inbuf: *const c_uchar, -+ inlen: c_uint, -+ arg: *mut c_void, -+ ) -> c_int, -+ arg: *mut c_void, -+ ); -+ #[cfg(any(ossl102, libressl261))] -+ pub fn SSL_get0_alpn_selected(s: *const SSL, data: *mut *const c_uchar, len: *mut c_uint); -+} -+ -+#[cfg(not(osslconf = "OPENSSL_NO_PSK"))] -+extern "C" { -+ pub fn SSL_CTX_set_psk_client_callback( -+ ssl: *mut SSL_CTX, -+ psk_client_cb: Option< -+ extern "C" fn(*mut SSL, *const c_char, *mut c_char, c_uint, *mut c_uchar, c_uint) -+ -> c_uint, -+ >, -+ ); -+ pub fn SSL_CTX_set_psk_server_callback( -+ ssl: *mut SSL_CTX, -+ psk_server_cb: Option< -+ extern "C" fn(*mut SSL, *const c_char, *mut c_uchar, c_uint) -> c_uint, -+ >, -+ ); -+} -+ -+extern "C" { -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_add_custom_ext( -+ ctx: *mut ::SSL_CTX, -+ ext_type: c_uint, -+ context: c_uint, -+ add_cb: SSL_custom_ext_add_cb_ex, -+ free_cb: SSL_custom_ext_free_cb_ex, -+ add_arg: *mut c_void, -+ parse_cb: SSL_custom_ext_parse_cb_ex, -+ parse_arg: *mut c_void, -+ ) -> c_int; -+ -+ #[cfg(ossl102)] -+ pub fn SSL_extension_supported(ext_type: c_uint) -> c_int; -+} -+ -+#[cfg(ossl111)] -+pub type SSL_CTX_keylog_cb_func = -+ Option; -+ -+extern "C" { -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_set_keylog_callback(ctx: *mut SSL_CTX, cb: SSL_CTX_keylog_cb_func); -+ -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_set_max_early_data(ctx: *mut SSL_CTX, max_early_data: u32) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_get_max_early_data(ctx: *const SSL_CTX) -> u32; -+ #[cfg(ossl111)] -+ pub fn SSL_set_max_early_data(ctx: *mut SSL, max_early_data: u32) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_get_max_early_data(ctx: *const SSL) -> u32; -+ -+ pub fn SSL_get_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; -+ pub fn SSL_get_peer_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; -+} -+ -+pub const SSL_AD_ILLEGAL_PARAMETER: c_int = SSL3_AD_ILLEGAL_PARAMETER; -+pub const SSL_AD_DECODE_ERROR: c_int = TLS1_AD_DECODE_ERROR; -+pub const SSL_AD_UNRECOGNIZED_NAME: c_int = TLS1_AD_UNRECOGNIZED_NAME; -+pub const SSL_ERROR_NONE: c_int = 0; -+pub const SSL_ERROR_SSL: c_int = 1; -+pub const SSL_ERROR_SYSCALL: c_int = 5; -+pub const SSL_ERROR_WANT_ACCEPT: c_int = 8; -+pub const SSL_ERROR_WANT_CONNECT: c_int = 7; -+pub const SSL_ERROR_WANT_READ: c_int = 2; -+pub const SSL_ERROR_WANT_WRITE: c_int = 3; -+pub const SSL_ERROR_WANT_X509_LOOKUP: c_int = 4; -+pub const SSL_ERROR_ZERO_RETURN: c_int = 6; -+pub const SSL_VERIFY_NONE: c_int = 0; -+pub const SSL_VERIFY_PEER: c_int = 1; -+pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; -+pub const SSL_CTRL_SET_TMP_DH: c_int = 3; -+pub const SSL_CTRL_SET_TMP_ECDH: c_int = 4; -+#[cfg(any(libressl, all(ossl101, not(ossl110))))] -+pub const SSL_CTRL_GET_SESSION_REUSED: c_int = 8; -+pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14; -+#[cfg(any(libressl, all(ossl101, not(ossl110))))] -+pub const SSL_CTRL_OPTIONS: c_int = 32; -+pub const SSL_CTRL_MODE: c_int = 33; -+pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41; -+pub const SSL_CTRL_SET_SESS_CACHE_MODE: c_int = 44; -+pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_CB: c_int = 53; -+pub const SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG: c_int = 54; -+pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; -+pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB: c_int = 63; -+pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG: c_int = 64; -+pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE: c_int = 65; -+pub const SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 70; -+pub const SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP: c_int = 71; -+#[cfg(any(libressl, all(ossl101, not(ossl110))))] -+pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; -+pub const SSL_CTRL_GET_EXTRA_CHAIN_CERTS: c_int = 82; -+#[cfg(any(libressl, all(ossl102, not(ossl110))))] -+pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94; -+#[cfg(ossl102)] -+pub const SSL_CTRL_SET_VERIFY_CERT_STORE: c_int = 106; -+#[cfg(ossl110)] -+pub const SSL_CTRL_SET_MIN_PROTO_VERSION: c_int = 123; -+#[cfg(ossl110)] -+pub const SSL_CTRL_SET_MAX_PROTO_VERSION: c_int = 124; -+#[cfg(ossl110g)] -+pub const SSL_CTRL_GET_MIN_PROTO_VERSION: c_int = 130; -+#[cfg(ossl110g)] -+pub const SSL_CTRL_GET_MAX_PROTO_VERSION: c_int = 131; -+ -+pub unsafe fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *mut DH) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) -+} -+ -+pub unsafe fn SSL_CTX_set_tmp_ecdh(ctx: *mut SSL_CTX, key: *mut EC_KEY) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void) -+} -+ -+pub unsafe fn SSL_set_tmp_dh(ssl: *mut SSL, dh: *mut DH) -> c_long { -+ SSL_ctrl(ssl, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) -+} -+ -+pub unsafe fn SSL_set_tmp_ecdh(ssl: *mut SSL, key: *mut EC_KEY) -> c_long { -+ SSL_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH, 0, key as *mut c_void) -+} -+ -+pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void) -+} -+ -+pub unsafe fn SSL_CTX_get_extra_chain_certs( -+ ctx: *mut SSL_CTX, -+ chain: *mut *mut stack_st_X509, -+) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_EXTRA_CHAIN_CERTS, 0, chain as *mut c_void) -+} -+ -+#[cfg(ossl102)] -+pub unsafe fn SSL_CTX_set0_verify_cert_store(ctx: *mut SSL_CTX, st: *mut X509_STORE) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_VERIFY_CERT_STORE, 0, st as *mut c_void) -+} -+ -+#[cfg(any(libressl, all(ossl102, not(ossl110))))] -+pub unsafe fn SSL_CTX_set_ecdh_auto(ctx: *mut SSL_CTX, onoff: c_int) -> c_int { -+ SSL_CTX_ctrl( -+ ctx, -+ SSL_CTRL_SET_ECDH_AUTO, -+ onoff as c_long, -+ ptr::null_mut(), -+ ) as c_int -+} -+ -+#[cfg(any(libress, all(ossl102, not(ossl110))))] -+pub unsafe fn SSL_set_ecdh_auto(ssl: *mut ::SSL, onoff: c_int) -> c_int { -+ SSL_ctrl( -+ ssl, -+ SSL_CTRL_SET_ECDH_AUTO, -+ onoff as c_long, -+ ptr::null_mut(), -+ ) as c_int -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub unsafe fn SSL_CTX_set_min_proto_version(ctx: *mut SSL_CTX, version: c_int) -> c_int { -+ SSL_CTX_ctrl( -+ ctx, -+ SSL_CTRL_SET_MIN_PROTO_VERSION, -+ version as c_long, -+ ptr::null_mut(), -+ ) as c_int -+ } -+ -+ pub unsafe fn SSL_CTX_set_max_proto_version(ctx: *mut SSL_CTX, version: c_int) -> c_int { -+ SSL_CTX_ctrl( -+ ctx, -+ SSL_CTRL_SET_MAX_PROTO_VERSION, -+ version as c_long, -+ ptr::null_mut(), -+ ) as c_int -+ } -+ } else if #[cfg(libressl261)] { -+ extern "C" { -+ pub fn SSL_CTX_set_min_proto_version(ctx: *mut ::SSL_CTX, version: u16) -> c_int; -+ pub fn SSL_CTX_set_max_proto_version(ctx: *mut ::SSL_CTX, version: u16) -> c_int; -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110g)] { -+ #[cfg(ossl110g)] -+ pub unsafe fn SSL_CTX_get_min_proto_version(ctx: *mut SSL_CTX) -> c_int { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int -+ } -+ -+ #[cfg(ossl110g)] -+ pub unsafe fn SSL_CTX_get_max_proto_version(ctx: *mut SSL_CTX) -> c_int { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int -+ } -+ } else if #[cfg(libressl270)] { -+ extern "C" { -+ pub fn SSL_CTX_get_min_proto_version(ctx: *mut ::SSL_CTX) -> c_int; -+ pub fn SSL_CTX_get_max_proto_version(ctx: *mut ::SSL_CTX) -> c_int; -+ } -+ } -+} -+ -+#[cfg(ossl110)] -+pub unsafe fn SSL_set_min_proto_version(s: *mut SSL, version: c_int) -> c_int { -+ SSL_ctrl( -+ s, -+ SSL_CTRL_SET_MIN_PROTO_VERSION, -+ version as c_long, -+ ptr::null_mut(), -+ ) as c_int -+} -+ -+#[cfg(ossl110)] -+pub unsafe fn SSL_set_max_proto_version(s: *mut SSL, version: c_int) -> c_int { -+ SSL_ctrl( -+ s, -+ SSL_CTRL_SET_MAX_PROTO_VERSION, -+ version as c_long, -+ ptr::null_mut(), -+ ) as c_int -+} -+ -+#[cfg(ossl110g)] -+pub unsafe fn SSL_get_min_proto_version(s: *mut SSL) -> c_int { -+ SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int -+} -+ -+#[cfg(ossl110g)] -+pub unsafe fn SSL_get_max_proto_version(s: *mut SSL) -> c_int { -+ SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int -+} -+ -+extern "C" { -+ pub fn SSL_CTX_set_cipher_list(ssl: *mut SSL_CTX, s: *const c_char) -> c_int; -+ pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; -+ pub fn SSL_CTX_free(ctx: *mut SSL_CTX); -+ #[cfg(any(ossl110, libressl273))] -+ pub fn SSL_CTX_up_ref(x: *mut SSL_CTX) -> c_int; -+ pub fn SSL_CTX_get_cert_store(ctx: *const SSL_CTX) -> *mut X509_STORE; -+ -+ pub fn SSL_get_current_cipher(ssl: *const SSL) -> *const SSL_CIPHER; -+ pub fn SSL_CIPHER_get_bits(cipher: *const SSL_CIPHER, alg_bits: *mut c_int) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *const c_char; -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_CIPHER_get_version(cipher: *const SSL_CIPHER) -> *mut c_char; -+ } -+ } -+} -+extern "C" { -+ #[cfg(ossl111)] -+ pub fn SSL_CIPHER_get_handshake_digest(cipher: *const ::SSL_CIPHER) -> *const ::EVP_MD; -+ pub fn SSL_CIPHER_get_name(cipher: *const SSL_CIPHER) -> *const c_char; -+ -+ pub fn SSL_pending(ssl: *const SSL) -> c_int; -+ pub fn SSL_set_bio(ssl: *mut SSL, rbio: *mut BIO, wbio: *mut BIO); -+ pub fn SSL_get_rbio(ssl: *const SSL) -> *mut BIO; -+ pub fn SSL_get_wbio(ssl: *const SSL) -> *mut BIO; -+ #[cfg(ossl111)] -+ pub fn SSL_CTX_set_ciphersuites(ctx: *mut SSL_CTX, str: *const c_char) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_set_ciphersuites(ssl: *mut ::SSL, str: *const c_char) -> c_int; -+ pub fn SSL_set_verify( -+ ssl: *mut SSL, -+ mode: c_int, -+ // FIXME should be unsafe -+ verify_callback: Option c_int>, -+ ); -+ pub fn SSL_CTX_use_PrivateKey(ctx: *mut SSL_CTX, key: *mut EVP_PKEY) -> c_int; -+ pub fn SSL_CTX_use_certificate(ctx: *mut SSL_CTX, cert: *mut X509) -> c_int; -+ -+ pub fn SSL_CTX_use_PrivateKey_file( -+ ctx: *mut SSL_CTX, -+ key_file: *const c_char, -+ file_type: c_int, -+ ) -> c_int; -+ pub fn SSL_CTX_use_certificate_file( -+ ctx: *mut SSL_CTX, -+ cert_file: *const c_char, -+ file_type: c_int, -+ ) -> c_int; -+ pub fn SSL_CTX_use_certificate_chain_file( -+ ctx: *mut SSL_CTX, -+ cert_chain_file: *const c_char, -+ ) -> c_int; -+ pub fn SSL_load_client_CA_file(file: *const c_char) -> *mut stack_st_X509_NAME; -+ -+ #[cfg(not(ossl110))] -+ pub fn SSL_load_error_strings(); -+ pub fn SSL_state_string(ssl: *const SSL) -> *const c_char; -+ pub fn SSL_state_string_long(ssl: *const SSL) -> *const c_char; -+ -+ #[cfg(ossl111)] -+ pub fn SSL_SESSION_set_max_early_data(ctx: *mut SSL_SESSION, max_early_data: u32) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_SESSION_get_max_early_data(ctx: *const SSL_SESSION) -> u32; -+ -+ pub fn SSL_SESSION_get_id(s: *const SSL_SESSION, len: *mut c_uint) -> *const c_uchar; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn SSL_SESSION_up_ref(ses: *mut SSL_SESSION) -> c_int; -+ pub fn SSL_SESSION_free(s: *mut SSL_SESSION); -+ pub fn i2d_SSL_SESSION(s: *mut SSL_SESSION, pp: *mut *mut c_uchar) -> c_int; -+ pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> c_int; -+ pub fn d2i_SSL_SESSION( -+ a: *mut *mut SSL_SESSION, -+ pp: *mut *const c_uchar, -+ len: c_long, -+ ) -> *mut SSL_SESSION; -+ -+ pub fn SSL_get_peer_certificate(ssl: *const SSL) -> *mut X509; -+ -+ pub fn SSL_get_peer_cert_chain(ssl: *const SSL) -> *mut stack_st_X509; -+ -+ pub fn SSL_CTX_set_verify( -+ ctx: *mut SSL_CTX, -+ mode: c_int, -+ verify_callback: Option c_int>, -+ ); -+ pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int); -+ -+ pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> c_int; -+ -+ pub fn SSL_CTX_set_session_id_context( -+ ssl: *mut SSL_CTX, -+ sid_ctx: *const c_uchar, -+ sid_ctx_len: c_uint, -+ ) -> c_int; -+ -+ pub fn SSL_new(ctx: *mut SSL_CTX) -> *mut SSL; -+ -+ #[cfg(any(ossl102, libressl261))] -+ pub fn SSL_get0_param(ssl: *mut SSL) -> *mut X509_VERIFY_PARAM; -+ -+ pub fn SSL_free(ssl: *mut SSL); -+ pub fn SSL_accept(ssl: *mut SSL) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_stateless(s: *mut SSL) -> c_int; -+ pub fn SSL_connect(ssl: *mut SSL) -> c_int; -+ pub fn SSL_read(ssl: *mut SSL, buf: *mut c_void, num: c_int) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_read_early_data( -+ s: *mut ::SSL, -+ buf: *mut c_void, -+ num: size_t, -+ readbytes: *mut size_t, -+ ) -> c_int; -+} -+ -+#[cfg(ossl111)] -+pub const SSL_READ_EARLY_DATA_ERROR: c_int = 0; -+#[cfg(ossl111)] -+pub const SSL_READ_EARLY_DATA_SUCCESS: c_int = 1; -+#[cfg(ossl111)] -+pub const SSL_READ_EARLY_DATA_FINISH: c_int = 2; -+ -+extern "C" { -+ pub fn SSL_write(ssl: *mut SSL, buf: *const c_void, num: c_int) -> c_int; -+ #[cfg(ossl111)] -+ pub fn SSL_write_early_data( -+ s: *mut SSL, -+ buf: *const c_void, -+ num: size_t, -+ written: *mut size_t, -+ ) -> c_int; -+ pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -+ pub fn SSL_CTX_ctrl(ctx: *mut SSL_CTX, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long; -+ pub fn SSL_CTX_callback_ctrl( -+ ctx: *mut SSL_CTX, -+ cmd: c_int, -+ fp: Option, -+ ) -> c_long; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn TLS_method() -> *const SSL_METHOD; -+ -+ pub fn DTLS_method() -> *const SSL_METHOD; -+ } -+ } else { -+ extern "C" { -+ #[cfg(not(osslconf = "OPENSSL_NO_SSL3_METHOD"))] -+ pub fn SSLv3_method() -> *const SSL_METHOD; -+ -+ pub fn SSLv23_method() -> *const SSL_METHOD; -+ -+ pub fn TLSv1_method() -> *const SSL_METHOD; -+ -+ pub fn TLSv1_1_method() -> *const SSL_METHOD; -+ -+ pub fn TLSv1_2_method() -> *const SSL_METHOD; -+ -+ pub fn DTLSv1_method() -> *const SSL_METHOD; -+ -+ #[cfg(ossl102)] -+ pub fn DTLSv1_2_method() -> *const SSL_METHOD; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn SSL_get_error(ssl: *const SSL, ret: c_int) -> c_int; -+ pub fn SSL_get_version(ssl: *const SSL) -> *const c_char; -+ -+ pub fn SSL_do_handshake(ssl: *mut SSL) -> c_int; -+ pub fn SSL_shutdown(ssl: *mut SSL) -> c_int; -+ -+ pub fn SSL_CTX_set_client_CA_list(ctx: *mut SSL_CTX, list: *mut stack_st_X509_NAME); -+ -+ pub fn SSL_CTX_set_default_verify_paths(ctx: *mut SSL_CTX) -> c_int; -+ pub fn SSL_CTX_load_verify_locations( -+ ctx: *mut SSL_CTX, -+ CAfile: *const c_char, -+ CApath: *const c_char, -+ ) -> c_int; -+ -+ pub fn SSL_get_ssl_method(ssl: *mut SSL) -> *const SSL_METHOD; -+ -+ pub fn SSL_set_connect_state(s: *mut SSL); -+ pub fn SSL_set_accept_state(s: *mut SSL); -+ -+ #[cfg(not(ossl110))] -+ pub fn SSL_library_init() -> c_int; -+ -+ pub fn SSL_CIPHER_description( -+ cipher: *const SSL_CIPHER, -+ buf: *mut c_char, -+ size: c_int, -+ ) -> *mut c_char; -+ -+ pub fn SSL_get_certificate(ssl: *const SSL) -> *mut X509; -+} -+cfg_if! { -+ if #[cfg(any(ossl102, libressl280))] { -+ extern "C" { -+ pub fn SSL_get_privatekey(ssl: *const SSL) -> *mut EVP_PKEY; -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_get_privatekey(ssl: *mut SSL) -> *mut EVP_PKEY; -+ } -+ } -+} -+ -+extern "C" { -+ #[cfg(ossl102)] -+ pub fn SSL_CTX_get0_certificate(ctx: *const SSL_CTX) -> *mut X509; -+ #[cfg(ossl102)] -+ pub fn SSL_CTX_get0_privatekey(ctx: *const SSL_CTX) -> *mut EVP_PKEY; -+ -+ pub fn SSL_set_shutdown(ss: *mut SSL, mode: c_int); -+ pub fn SSL_get_shutdown(ssl: *const SSL) -> c_int; -+ pub fn SSL_version(ssl: *const SSL) -> c_int; -+ pub fn SSL_get_session(s: *const SSL) -> *mut SSL_SESSION; -+ pub fn SSL_get_SSL_CTX(ssl: *const SSL) -> *mut SSL_CTX; -+ pub fn SSL_set_SSL_CTX(ssl: *mut SSL, ctx: *mut SSL_CTX) -> *mut SSL_CTX; -+ -+ pub fn SSL_get_verify_result(ssl: *const SSL) -> c_long; -+ #[cfg(ossl110)] -+ pub fn SSL_get0_verified_chain(ssl: *const SSL) -> *mut stack_st_X509; -+ -+ #[cfg(ossl110)] -+ pub fn SSL_get_client_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; -+ #[cfg(ossl110)] -+ pub fn SSL_get_server_random(ssl: *const SSL, out: *mut c_uchar, len: size_t) -> size_t; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn SSL_SESSION_get_master_key( -+ session: *const SSL_SESSION, -+ out: *mut c_uchar, -+ outlen: size_t, -+ ) -> size_t; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub unsafe fn SSL_get_ex_new_index( -+ l: c_long, -+ p: *mut c_void, -+ newf: Option, -+ dupf: Option, -+ freef: Option, -+ ) -> c_int { -+ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, l, p, newf, dupf, freef) -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_get_ex_new_index( -+ argl: c_long, -+ argp: *mut c_void, -+ new_func: Option, -+ dup_func: Option, -+ free_func: Option, -+ ) -> c_int; -+ } -+ } -+} -+extern "C" { -+ pub fn SSL_set_ex_data(ssl: *mut SSL, idx: c_int, data: *mut c_void) -> c_int; -+ pub fn SSL_get_ex_data(ssl: *const SSL, idx: c_int) -> *mut c_void; -+} -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub unsafe fn SSL_CTX_get_ex_new_index( -+ l: c_long, -+ p: *mut c_void, -+ newf: Option, -+ dupf: Option, -+ freef: Option, -+ ) -> c_int { -+ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, l, p, newf, dupf, freef) -+ } -+ } else { -+ extern "C" { -+ pub fn SSL_CTX_get_ex_new_index( -+ argl: c_long, -+ argp: *mut c_void, -+ new_func: Option<::CRYPTO_EX_new>, -+ dup_func: Option<::CRYPTO_EX_dup>, -+ free_func: Option<::CRYPTO_EX_free>, -+ ) -> c_int; -+ } -+ } -+} -+extern "C" { -+ pub fn SSL_CTX_set_ex_data(ctx: *mut SSL_CTX, idx: c_int, data: *mut c_void) -> c_int; -+ pub fn SSL_CTX_get_ex_data(ctx: *const SSL_CTX, idx: c_int) -> *mut c_void; -+ -+ pub fn SSL_get_ex_data_X509_STORE_CTX_idx() -> c_int; -+} -+ -+pub unsafe fn SSL_CTX_set_session_cache_mode(ctx: *mut SSL_CTX, m: c_long) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_SESS_CACHE_MODE, m, ptr::null_mut()) -+} -+ -+pub unsafe fn SSL_CTX_set_read_ahead(ctx: *mut SSL_CTX, m: c_long) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_READ_AHEAD, m, ptr::null_mut()) -+} -+ -+extern "C" { -+ // FIXME should take an option -+ pub fn SSL_CTX_set_tmp_dh_callback( -+ ctx: *mut SSL_CTX, -+ dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH, -+ ); -+ // FIXME should take an option -+ pub fn SSL_set_tmp_dh_callback( -+ ctx: *mut SSL, -+ dh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -> *mut DH, -+ ); -+ // FIXME should take an option -+ #[cfg(not(ossl110))] -+ pub fn SSL_CTX_set_tmp_ecdh_callback( -+ ctx: *mut ::SSL_CTX, -+ ecdh: unsafe extern "C" fn(ssl: *mut ::SSL, is_export: c_int, keylength: c_int) -+ -> *mut ::EC_KEY, -+ ); -+ // FIXME should take an option -+ #[cfg(not(ossl110))] -+ pub fn SSL_set_tmp_ecdh_callback( -+ ssl: *mut SSL, -+ ecdh: unsafe extern "C" fn(ssl: *mut SSL, is_export: c_int, keylength: c_int) -+ -> *mut EC_KEY, -+ ); -+} -+ -+cfg_if! { -+ if #[cfg(libressl)] { -+ extern "C" { -+ pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const libc::c_void; -+ pub fn SSL_COMP_get_name(comp: *const libc::c_void) -> *const c_char; -+ } -+ } else if #[cfg(not(osslconf = "OPENSSL_NO_COMP"))] { -+ extern "C" { -+ pub fn SSL_get_current_compression(ssl: *mut SSL) -> *const COMP_METHOD; -+ pub fn SSL_COMP_get_name(comp: *const COMP_METHOD) -> *const c_char; -+ } -+ } -+} -+ -+extern "C" { -+ #[cfg(ossl110)] -+ pub fn SSL_CIPHER_get_cipher_nid(c: *const SSL_CIPHER) -> c_int; -+ #[cfg(ossl110)] -+ pub fn SSL_CIPHER_get_digest_nid(c: *const SSL_CIPHER) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn SSL_session_reused(ssl: *mut SSL) -> c_int; -+ } -+ } else { -+ pub unsafe fn SSL_session_reused(ssl: *mut SSL) -> c_int { -+ SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(any(ossl110f, libressl273))] { -+ extern "C" { -+ pub fn SSL_is_server(s: *const SSL) -> c_int; -+ } -+ } else if #[cfg(ossl102)] { -+ extern "C" { -+ pub fn SSL_is_server(s: *mut SSL) -> c_int; -+ } -+ } -+} -+ -+#[cfg(ossl110)] -+pub const OPENSSL_INIT_LOAD_SSL_STRINGS: u64 = 0x00200000; -+ -+extern "C" { -+ #[cfg(ossl110)] -+ pub fn OPENSSL_init_ssl(opts: u64, settings: *const OPENSSL_INIT_SETTINGS) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_ssl3.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_ssl3.rs +++ /dev/null @@ -1,8 +0,0 @@ ---- src/vendor/openssl-sys/src/ssl3.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/ssl3.rs -@@ -0,0 +1,5 @@ -+use libc::*; -+ -+pub const SSL3_VERSION: c_int = 0x300; -+ -+pub const SSL3_AD_ILLEGAL_PARAMETER: c_int = 47; Index: lang/rust/files/patch-src_vendor_openssl-sys_src_stack.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_stack.rs +++ /dev/null @@ -1,48 +0,0 @@ ---- src/vendor/openssl-sys/src/stack.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/stack.rs -@@ -0,0 +1,45 @@ -+use libc::*; -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum OPENSSL_STACK {} -+ } else { -+ #[repr(C)] -+ pub struct _STACK { -+ pub num: c_int, -+ pub data: *mut *mut c_char, -+ pub sorted: c_int, -+ pub num_alloc: c_int, -+ pub comp: Option c_int>, -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn OPENSSL_sk_num(stack: *const OPENSSL_STACK) -> c_int; -+ pub fn OPENSSL_sk_value(stack: *const OPENSSL_STACK, idx: c_int) -> *mut c_void; -+ -+ pub fn OPENSSL_sk_new_null() -> *mut OPENSSL_STACK; -+ pub fn OPENSSL_sk_free(st: *mut OPENSSL_STACK); -+ pub fn OPENSSL_sk_pop_free( -+ st: *mut OPENSSL_STACK, -+ free: Option, -+ ); -+ pub fn OPENSSL_sk_push(st: *mut OPENSSL_STACK, data: *const c_void) -> c_int; -+ pub fn OPENSSL_sk_pop(st: *mut OPENSSL_STACK) -> *mut c_void; -+ } -+ } else { -+ extern "C" { -+ pub fn sk_num(st: *const _STACK) -> c_int; -+ pub fn sk_value(st: *const _STACK, n: c_int) -> *mut c_void; -+ -+ pub fn sk_new_null() -> *mut _STACK; -+ pub fn sk_free(st: *mut _STACK); -+ pub fn sk_pop_free(st: *mut _STACK, free: Option); -+ pub fn sk_push(st: *mut _STACK, data: *mut c_void) -> c_int; -+ pub fn sk_pop(st: *mut _STACK) -> *mut c_void; -+ } -+ } -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_tls1.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_tls1.rs +++ /dev/null @@ -1,114 +0,0 @@ ---- src/vendor/openssl-sys/src/tls1.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/tls1.rs -@@ -0,0 +1,111 @@ -+use libc::*; -+use std::ptr; -+use std::mem; -+ -+use *; -+ -+pub const TLS1_VERSION: c_int = 0x301; -+pub const TLS1_1_VERSION: c_int = 0x302; -+pub const TLS1_2_VERSION: c_int = 0x303; -+#[cfg(ossl111)] -+pub const TLS1_3_VERSION: c_int = 0x304; -+ -+pub const TLS1_AD_DECODE_ERROR: c_int = 50; -+pub const TLS1_AD_UNRECOGNIZED_NAME: c_int = 112; -+ -+pub const TLSEXT_NAMETYPE_host_name: c_int = 0; -+pub const TLSEXT_STATUSTYPE_ocsp: c_int = 1; -+ -+extern "C" { -+ pub fn SSL_get_servername(ssl: *const SSL, name_type: c_int) -> *const c_char; -+ -+ pub fn SSL_export_keying_material( -+ s: *mut SSL, -+ out: *mut c_uchar, -+ olen: size_t, -+ label: *const c_char, -+ llen: size_t, -+ context: *const c_uchar, -+ contextlen: size_t, -+ use_context: c_int, -+ ) -> c_int; -+ -+ #[cfg(ossl111)] -+ pub fn SSL_export_keying_material_early( -+ s: *mut ::SSL, -+ out: *mut c_uchar, -+ olen: size_t, -+ label: *const c_char, -+ llen: size_t, -+ context: *const c_uchar, -+ contextlen: size_t, -+ ) -> c_int; -+} -+ -+pub unsafe fn SSL_set_tlsext_host_name(s: *mut SSL, name: *mut c_char) -> c_long { -+ SSL_ctrl( -+ s, -+ SSL_CTRL_SET_TLSEXT_HOSTNAME, -+ TLSEXT_NAMETYPE_host_name as c_long, -+ name as *mut c_void, -+ ) -+} -+ -+pub unsafe fn SSL_set_tlsext_status_type(s: *mut SSL, type_: c_int) -> c_long { -+ SSL_ctrl( -+ s, -+ SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, -+ type_ as c_long, -+ ptr::null_mut(), -+ ) -+} -+ -+pub unsafe fn SSL_get_tlsext_status_ocsp_resp(ssl: *mut SSL, resp: *mut *mut c_uchar) -> c_long { -+ SSL_ctrl( -+ ssl, -+ SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP, -+ 0, -+ resp as *mut c_void, -+ ) -+} -+ -+pub unsafe fn SSL_set_tlsext_status_ocsp_resp( -+ ssl: *mut SSL, -+ resp: *mut c_uchar, -+ len: c_long, -+) -> c_long { -+ SSL_ctrl( -+ ssl, -+ SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP, -+ len, -+ resp as *mut c_void, -+ ) -+} -+ -+pub unsafe fn SSL_CTX_set_tlsext_servername_callback( -+ ctx: *mut SSL_CTX, -+ // FIXME should have the right signature -+ cb: Option, -+) -> c_long { -+ SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_CB, cb) -+} -+ -+pub const SSL_TLSEXT_ERR_OK: c_int = 0; -+pub const SSL_TLSEXT_ERR_ALERT_WARNING: c_int = 1; -+pub const SSL_TLSEXT_ERR_ALERT_FATAL: c_int = 2; -+pub const SSL_TLSEXT_ERR_NOACK: c_int = 3; -+ -+pub unsafe fn SSL_CTX_set_tlsext_servername_arg(ctx: *mut SSL_CTX, arg: *mut c_void) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG, 0, arg) -+} -+ -+pub unsafe fn SSL_CTX_set_tlsext_status_cb( -+ ctx: *mut SSL_CTX, -+ cb: Option c_int>, -+) -> c_long { -+ SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, mem::transmute(cb)) -+} -+ -+pub unsafe fn SSL_CTX_set_tlsext_status_arg(ctx: *mut SSL_CTX, arg: *mut c_void) -> c_long { -+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG, 0, arg) -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_x509.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_x509.rs +++ /dev/null @@ -1,351 +0,0 @@ ---- src/vendor/openssl-sys/src/x509.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/x509.rs -@@ -0,0 +1,348 @@ -+use libc::*; -+ -+use *; -+ -+pub const X509_FILETYPE_PEM: c_int = 1; -+pub const X509_FILETYPE_ASN1: c_int = 2; -+pub const X509_FILETYPE_DEFAULT: c_int = 3; -+ -+#[repr(C)] -+pub struct X509_VAL { -+ pub notBefore: *mut ASN1_TIME, -+ pub notAfter: *mut ASN1_TIME, -+} -+ -+pub enum X509_NAME_ENTRY {} -+ -+stack!(stack_st_X509_NAME); -+ -+pub enum X509_EXTENSION {} -+ -+stack!(stack_st_X509_EXTENSION); -+ -+stack!(stack_st_X509_ATTRIBUTE); -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum X509_REQ_INFO {} -+ } else { -+ #[repr(C)] -+ pub struct X509_REQ_INFO { -+ pub enc: ASN1_ENCODING, -+ pub version: *mut ::ASN1_INTEGER, -+ pub subject: *mut ::X509_NAME, -+ pubkey: *mut c_void, -+ pub attributes: *mut stack_st_X509_ATTRIBUTE, -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum X509_REQ {} -+ } else { -+ #[repr(C)] -+ pub struct X509_REQ { -+ pub req_info: *mut X509_REQ_INFO, -+ sig_alg: *mut c_void, -+ signature: *mut c_void, -+ references: c_int, -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub enum X509_CINF {} -+ } else { -+ #[repr(C)] -+ pub struct X509_CINF { -+ version: *mut c_void, -+ serialNumber: *mut c_void, -+ signature: *mut c_void, -+ issuer: *mut c_void, -+ pub validity: *mut X509_VAL, -+ subject: *mut c_void, -+ key: *mut c_void, -+ issuerUID: *mut c_void, -+ subjectUID: *mut c_void, -+ pub extensions: *mut stack_st_X509_EXTENSION, -+ enc: ASN1_ENCODING, -+ } -+ } -+} -+ -+stack!(stack_st_X509); -+ -+extern "C" { -+ pub fn X509_verify_cert_error_string(n: c_long) -> *const c_char; -+ -+ pub fn X509_sign(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; -+ -+ pub fn X509_digest( -+ x: *const X509, -+ digest: *const EVP_MD, -+ buf: *mut c_uchar, -+ len: *mut c_uint, -+ ) -> c_int; -+ -+ pub fn X509_REQ_sign(x: *mut X509_REQ, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> c_int; -+ -+ pub fn i2d_X509_bio(b: *mut BIO, x: *mut X509) -> c_int; -+ pub fn i2d_X509_REQ_bio(b: *mut BIO, x: *mut X509_REQ) -> c_int; -+ pub fn i2d_PrivateKey_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; -+ pub fn i2d_PUBKEY_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; -+ -+ pub fn i2d_PUBKEY(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_PUBKEY(k: *mut *mut EVP_PKEY, buf: *mut *const u8, len: c_long) -> *mut EVP_PKEY; -+ pub fn d2i_RSA_PUBKEY(k: *mut *mut RSA, buf: *mut *const u8, len: c_long) -> *mut RSA; -+ pub fn i2d_RSA_PUBKEY(k: *mut RSA, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_DSA_PUBKEY(k: *mut *mut DSA, pp: *mut *const c_uchar, length: c_long) -> *mut DSA; -+ pub fn i2d_DSA_PUBKEY(a: *mut DSA, pp: *mut *mut c_uchar) -> c_int; -+ pub fn i2d_PrivateKey(k: *mut EVP_PKEY, buf: *mut *mut u8) -> c_int; -+ -+ pub fn d2i_ECPrivateKey( -+ k: *mut *mut EC_KEY, -+ pp: *mut *const c_uchar, -+ length: c_long, -+ ) -> *mut EC_KEY; -+ pub fn i2d_ECPrivateKey(ec_key: *mut EC_KEY, pp: *mut *mut c_uchar) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn X509_ALGOR_get0( -+ paobj: *mut *const ASN1_OBJECT, -+ pptype: *mut c_int, -+ ppval: *mut *const c_void, -+ alg: *const X509_ALGOR, -+ ); -+ } -+ } else if #[cfg(ossl102)] { -+ extern "C" { -+ pub fn X509_ALGOR_get0( -+ paobj: *mut *mut ASN1_OBJECT, -+ pptype: *mut c_int, -+ ppval: *mut *mut c_void, -+ alg: *mut X509_ALGOR, -+ ); -+ } -+ } -+} -+ -+extern "C" { -+ pub fn X509_gmtime_adj(time: *mut ASN1_TIME, adj: c_long) -> *mut ASN1_TIME; -+ -+ pub fn X509_to_X509_REQ(x: *mut X509, pkey: *mut EVP_PKEY, md: *const EVP_MD) -> *mut X509_REQ; -+ -+ pub fn X509_ALGOR_free(x: *mut X509_ALGOR); -+ -+ pub fn X509_REQ_new() -> *mut X509_REQ; -+ pub fn X509_REQ_free(x: *mut X509_REQ); -+ pub fn d2i_X509_REQ( -+ a: *mut *mut X509_REQ, -+ pp: *mut *const c_uchar, -+ length: c_long, -+ ) -> *mut X509_REQ; -+ pub fn i2d_X509_REQ(x: *mut X509_REQ, buf: *mut *mut u8) -> c_int; -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl273))] { -+ extern "C" { -+ pub fn X509_get0_signature( -+ psig: *mut *const ASN1_BIT_STRING, -+ palg: *mut *const X509_ALGOR, -+ x: *const X509, -+ ); -+ } -+ } else if #[cfg(ossl102)] { -+ extern "C" { -+ pub fn X509_get0_signature( -+ psig: *mut *mut ASN1_BIT_STRING, -+ palg: *mut *mut X509_ALGOR, -+ x: *const X509, -+ ); -+ } -+ } -+} -+extern "C" { -+ #[cfg(ossl102)] -+ pub fn X509_get_signature_nid(x: *const X509) -> c_int; -+ -+ pub fn X509_EXTENSION_free(ext: *mut X509_EXTENSION); -+ -+ pub fn X509_NAME_ENTRY_free(x: *mut X509_NAME_ENTRY); -+ -+ pub fn X509_NAME_new() -> *mut X509_NAME; -+ pub fn X509_NAME_free(x: *mut X509_NAME); -+ -+ pub fn X509_new() -> *mut X509; -+ pub fn X509_free(x: *mut X509); -+ pub fn i2d_X509(x: *mut X509, buf: *mut *mut u8) -> c_int; -+ pub fn d2i_X509(a: *mut *mut X509, pp: *mut *const c_uchar, length: c_long) -> *mut X509; -+ -+ pub fn X509_get_pubkey(x: *mut X509) -> *mut EVP_PKEY; -+ -+ pub fn X509_set_version(x: *mut X509, version: c_long) -> c_int; -+ pub fn X509_set_serialNumber(x: *mut X509, sn: *mut ASN1_INTEGER) -> c_int; -+ pub fn X509_get_serialNumber(x: *mut X509) -> *mut ASN1_INTEGER; -+ pub fn X509_set_issuer_name(x: *mut X509, name: *mut X509_NAME) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509_get_issuer_name(x: *const ::X509) -> *mut ::X509_NAME; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_get_issuer_name(x: *mut ::X509) -> *mut ::X509_NAME; -+ } -+ } -+} -+extern "C" { -+ pub fn X509_set_subject_name(x: *mut X509, name: *mut X509_NAME) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509_get_subject_name(x: *const ::X509) -> *mut ::X509_NAME; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_get_subject_name(x: *mut ::X509) -> *mut ::X509_NAME; -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn X509_set1_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -+ pub fn X509_set1_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_set_notBefore(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -+ pub fn X509_set_notAfter(x: *mut ::X509, tm: *const ::ASN1_TIME) -> c_int; -+ } -+ } -+} -+extern "C" { -+ #[cfg(ossl110)] -+ pub fn X509_REQ_get_version(req: *const X509_REQ) -> c_long; -+ pub fn X509_REQ_set_version(req: *mut X509_REQ, version: c_long) -> c_int; -+ #[cfg(ossl110)] -+ pub fn X509_REQ_get_subject_name(req: *const X509_REQ) -> *mut X509_NAME; -+ pub fn X509_REQ_set_subject_name(req: *mut X509_REQ, name: *mut X509_NAME) -> c_int; -+ pub fn X509_REQ_set_pubkey(req: *mut X509_REQ, pkey: *mut EVP_PKEY) -> c_int; -+ pub fn X509_REQ_get_pubkey(req: *mut X509_REQ) -> *mut EVP_PKEY; -+ pub fn X509_REQ_get_extensions(req: *mut X509_REQ) -> *mut stack_st_X509_EXTENSION; -+ pub fn X509_REQ_add_extensions(req: *mut X509_REQ, exts: *mut stack_st_X509_EXTENSION) -+ -> c_int; -+ pub fn X509_set_pubkey(x: *mut X509, pkey: *mut EVP_PKEY) -> c_int; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn X509_getm_notBefore(x: *const X509) -> *mut ASN1_TIME; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn X509_getm_notAfter(x: *const X509) -> *mut ASN1_TIME; -+ #[cfg(any(ossl110, libressl273))] -+ pub fn X509_up_ref(x: *mut X509) -> c_int; -+ -+ #[cfg(ossl110)] -+ pub fn X509_get0_extensions(req: *const ::X509) -> *const stack_st_X509_EXTENSION; -+} -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509_NAME_entry_count(n: *const X509_NAME) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_NAME_entry_count(n: *mut X509_NAME) -> c_int; -+ } -+ } -+} -+ -+cfg_if! { -+ if #[cfg(libressl280)] { -+ extern "C" { -+ pub fn X509_NAME_get_index_by_NID(n: *const X509_NAME, nid: c_int, last_pos: c_int) -> c_int; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_NAME_get_index_by_NID(n: *mut X509_NAME, nid: c_int, last_pos: c_int) -> c_int; -+ } -+ } -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509_NAME_get_entry(n: *const X509_NAME, loc: c_int) -> *mut X509_NAME_ENTRY; -+ pub fn X509_NAME_add_entry_by_NID( -+ x: *mut X509_NAME, -+ field: c_int, -+ ty: c_int, -+ bytes: *const c_uchar, -+ len: c_int, -+ loc: c_int, -+ set: c_int, -+ ) -> c_int; -+ pub fn X509_NAME_ENTRY_get_object(ne: *const X509_NAME_ENTRY) -> *mut ASN1_OBJECT; -+ pub fn X509_NAME_ENTRY_get_data(ne: *const X509_NAME_ENTRY) -> *mut ASN1_STRING; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_NAME_get_entry(n: *mut X509_NAME, loc: c_int) -> *mut X509_NAME_ENTRY; -+ pub fn X509_NAME_add_entry_by_NID( -+ x: *mut X509_NAME, -+ field: c_int, -+ ty: c_int, -+ bytes: *mut c_uchar, -+ len: c_int, -+ loc: c_int, -+ set: c_int, -+ ) -> c_int; -+ pub fn X509_NAME_ENTRY_get_object(ne: *mut X509_NAME_ENTRY) -> *mut ASN1_OBJECT; -+ pub fn X509_NAME_ENTRY_get_data(ne: *mut X509_NAME_ENTRY) -> *mut ASN1_STRING; -+ } -+ } -+} -+extern "C" { -+ pub fn X509_NAME_add_entry_by_txt( -+ x: *mut X509_NAME, -+ field: *const c_char, -+ ty: c_int, -+ bytes: *const c_uchar, -+ len: c_int, -+ loc: c_int, -+ set: c_int, -+ ) -> c_int; -+ -+ pub fn X509_add_ext(x: *mut X509, ext: *mut X509_EXTENSION, loc: c_int) -> c_int; -+} -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509_get_ext_d2i( -+ x: *const ::X509, -+ nid: c_int, -+ crit: *mut c_int, -+ idx: *mut c_int, -+ ) -> *mut c_void; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_get_ext_d2i( -+ x: *mut ::X509, -+ nid: c_int, -+ crit: *mut c_int, -+ idx: *mut c_int, -+ ) -> *mut c_void; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn X509_verify_cert(ctx: *mut X509_STORE_CTX) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_x509__vfy.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_x509__vfy.rs +++ /dev/null @@ -1,156 +0,0 @@ ---- src/vendor/openssl-sys/src/x509_vfy.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/x509_vfy.rs -@@ -0,0 +1,153 @@ -+use libc::*; -+ -+use *; -+ -+#[cfg(any(libressl, all(ossl102, not(ossl110))))] -+pub enum X509_VERIFY_PARAM_ID {} -+ -+pub const X509_V_OK: c_int = 0; -+#[cfg(ossl102f)] -+pub const X509_V_ERR_UNSPECIFIED: c_int = 1; -+pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: c_int = 2; -+pub const X509_V_ERR_UNABLE_TO_GET_CRL: c_int = 3; -+pub const X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: c_int = 4; -+pub const X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: c_int = 5; -+pub const X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: c_int = 6; -+pub const X509_V_ERR_CERT_SIGNATURE_FAILURE: c_int = 7; -+pub const X509_V_ERR_CRL_SIGNATURE_FAILURE: c_int = 8; -+pub const X509_V_ERR_CERT_NOT_YET_VALID: c_int = 9; -+pub const X509_V_ERR_CERT_HAS_EXPIRED: c_int = 10; -+pub const X509_V_ERR_CRL_NOT_YET_VALID: c_int = 11; -+pub const X509_V_ERR_CRL_HAS_EXPIRED: c_int = 12; -+pub const X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: c_int = 13; -+pub const X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: c_int = 14; -+pub const X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD: c_int = 15; -+pub const X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD: c_int = 16; -+pub const X509_V_ERR_OUT_OF_MEM: c_int = 17; -+pub const X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: c_int = 18; -+pub const X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: c_int = 19; -+pub const X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: c_int = 20; -+pub const X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: c_int = 21; -+pub const X509_V_ERR_CERT_CHAIN_TOO_LONG: c_int = 22; -+pub const X509_V_ERR_CERT_REVOKED: c_int = 23; -+pub const X509_V_ERR_INVALID_CA: c_int = 24; -+pub const X509_V_ERR_PATH_LENGTH_EXCEEDED: c_int = 25; -+pub const X509_V_ERR_INVALID_PURPOSE: c_int = 26; -+pub const X509_V_ERR_CERT_UNTRUSTED: c_int = 27; -+pub const X509_V_ERR_CERT_REJECTED: c_int = 28; -+pub const X509_V_ERR_SUBJECT_ISSUER_MISMATCH: c_int = 29; -+pub const X509_V_ERR_AKID_SKID_MISMATCH: c_int = 30; -+pub const X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: c_int = 31; -+pub const X509_V_ERR_KEYUSAGE_NO_CERTSIGN: c_int = 32; -+pub const X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: c_int = 33; -+pub const X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: c_int = 34; -+pub const X509_V_ERR_KEYUSAGE_NO_CRL_SIGN: c_int = 35; -+pub const X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION: c_int = 36; -+pub const X509_V_ERR_INVALID_NON_CA: c_int = 37; -+pub const X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED: c_int = 38; -+pub const X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE: c_int = 39; -+pub const X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED: c_int = 40; -+pub const X509_V_ERR_INVALID_EXTENSION: c_int = 41; -+pub const X509_V_ERR_INVALID_POLICY_EXTENSION: c_int = 42; -+pub const X509_V_ERR_NO_EXPLICIT_POLICY: c_int = 43; -+pub const X509_V_ERR_DIFFERENT_CRL_SCOPE: c_int = 44; -+pub const X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE: c_int = 45; -+pub const X509_V_ERR_UNNESTED_RESOURCE: c_int = 46; -+pub const X509_V_ERR_PERMITTED_VIOLATION: c_int = 47; -+pub const X509_V_ERR_EXCLUDED_VIOLATION: c_int = 48; -+pub const X509_V_ERR_SUBTREE_MINMAX: c_int = 49; -+pub const X509_V_ERR_APPLICATION_VERIFICATION: c_int = 50; -+pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE: c_int = 51; -+pub const X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX: c_int = 52; -+pub const X509_V_ERR_UNSUPPORTED_NAME_SYNTAX: c_int = 53; -+pub const X509_V_ERR_CRL_PATH_VALIDATION_ERROR: c_int = 54; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_INVALID_VERSION: c_int = 56; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_INVALID_ALGORITHM: c_int = 57; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_INVALID_CURVE: c_int = 58; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM: c_int = 59; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED: c_int = 60; -+#[cfg(ossl102)] -+pub const X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256: c_int = 61; -+#[cfg(ossl102)] -+pub const X509_V_ERR_HOSTNAME_MISMATCH: c_int = 62; -+#[cfg(ossl102)] -+pub const X509_V_ERR_EMAIL_MISMATCH: c_int = 63; -+#[cfg(ossl102)] -+pub const X509_V_ERR_IP_ADDRESS_MISMATCH: c_int = 64; -+cfg_if! { -+ if #[cfg(ossl110)] { -+ pub const X509_V_ERR_DANE_NO_MATCH: c_int = 65; -+ pub const X509_V_ERR_EE_KEY_TOO_SMALL: c_int = 66; -+ pub const X509_V_ERR_CA_KEY_TOO_SMALL: c_int = 67; -+ pub const X509_V_ERR_CA_MD_TOO_WEAK: c_int = 68; -+ pub const X509_V_ERR_INVALID_CALL: c_int = 69; -+ pub const X509_V_ERR_STORE_LOOKUP: c_int = 70; -+ pub const X509_V_ERR_NO_VALID_SCTS: c_int = 71; -+ } else if #[cfg(ossl102h)] { -+ pub const X509_V_ERR_INVALID_CALL: c_int = 65; -+ pub const X509_V_ERR_STORE_LOOKUP: c_int = 66; -+ pub const X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: c_int = 67; -+ } -+} -+ -+extern "C" { -+ pub fn X509_STORE_new() -> *mut X509_STORE; -+ pub fn X509_STORE_free(store: *mut X509_STORE); -+ -+ pub fn X509_STORE_CTX_new() -> *mut X509_STORE_CTX; -+ -+ pub fn X509_STORE_CTX_free(ctx: *mut X509_STORE_CTX); -+ pub fn X509_STORE_CTX_init( -+ ctx: *mut X509_STORE_CTX, -+ store: *mut X509_STORE, -+ x509: *mut X509, -+ chain: *mut stack_st_X509, -+ ) -> c_int; -+ pub fn X509_STORE_CTX_cleanup(ctx: *mut X509_STORE_CTX); -+ -+ pub fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int; -+ -+ pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int; -+ -+ pub fn X509_STORE_CTX_get_ex_data(ctx: *mut X509_STORE_CTX, idx: c_int) -> *mut c_void; -+ pub fn X509_STORE_CTX_get_error(ctx: *mut X509_STORE_CTX) -> c_int; -+ pub fn X509_STORE_CTX_set_error(ctx: *mut X509_STORE_CTX, error: c_int); -+ pub fn X509_STORE_CTX_get_error_depth(ctx: *mut X509_STORE_CTX) -> c_int; -+ pub fn X509_STORE_CTX_get_current_cert(ctx: *mut X509_STORE_CTX) -> *mut X509; -+} -+cfg_if! { -+ if #[cfg(ossl110)] { -+ extern "C" { -+ pub fn X509_STORE_CTX_get0_chain(ctx: *mut X509_STORE_CTX) -> *mut stack_st_X509; -+ } -+ } else { -+ extern "C" { -+ pub fn X509_STORE_CTX_get_chain(ctx: *mut X509_STORE_CTX) -> *mut stack_st_X509; -+ } -+ } -+} -+ -+extern "C" { -+ #[cfg(any(ossl102, libressl261))] -+ pub fn X509_VERIFY_PARAM_free(param: *mut X509_VERIFY_PARAM); -+ -+ #[cfg(any(ossl102, libressl261))] -+ pub fn X509_VERIFY_PARAM_set1_host( -+ param: *mut X509_VERIFY_PARAM, -+ name: *const c_char, -+ namelen: size_t, -+ ) -> c_int; -+ #[cfg(any(ossl102, libressl261))] -+ pub fn X509_VERIFY_PARAM_set_hostflags(param: *mut X509_VERIFY_PARAM, flags: c_uint); -+ #[cfg(any(ossl102, libressl261))] -+ pub fn X509_VERIFY_PARAM_set1_ip( -+ param: *mut X509_VERIFY_PARAM, -+ ip: *const c_uchar, -+ iplen: size_t, -+ ) -> c_int; -+} Index: lang/rust/files/patch-src_vendor_openssl-sys_src_x509v3.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl-sys_src_x509v3.rs +++ /dev/null @@ -1,95 +0,0 @@ ---- src/vendor/openssl-sys/src/x509v3.rs.orig 2018-09-16 20:29:19 UTC -+++ src/vendor/openssl-sys/src/x509v3.rs -@@ -0,0 +1,92 @@ -+use libc::*; -+ -+use *; -+ -+pub enum CONF_METHOD {} -+ -+pub const GEN_OTHERNAME: c_int = 0; -+pub const GEN_EMAIL: c_int = 1; -+pub const GEN_DNS: c_int = 2; -+pub const GEN_X400: c_int = 3; -+pub const GEN_DIRNAME: c_int = 4; -+pub const GEN_EDIPARTY: c_int = 5; -+pub const GEN_URI: c_int = 6; -+pub const GEN_IPADD: c_int = 7; -+pub const GEN_RID: c_int = 8; -+ -+#[repr(C)] -+pub struct GENERAL_NAME { -+ pub type_: c_int, -+ // FIXME should be a union -+ pub d: *mut c_void, -+} -+ -+stack!(stack_st_GENERAL_NAME); -+ -+extern "C" { -+ pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME); -+} -+ -+#[cfg(any(ossl102, libressl261))] -+pub const X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT: c_uint = 0x1; -+#[cfg(any(ossl102, libressl261))] -+pub const X509_CHECK_FLAG_NO_WILDCARDS: c_uint = 0x2; -+#[cfg(any(ossl102, libressl261))] -+pub const X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS: c_uint = 0x4; -+#[cfg(any(ossl102, libressl261))] -+pub const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS: c_uint = 0x8; -+#[cfg(any(ossl102, libressl261))] -+pub const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS: c_uint = 0x10; -+#[cfg(ossl110)] -+pub const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT: c_uint = 0x20; -+ -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ extern "C" { -+ pub fn X509V3_EXT_nconf_nid( -+ conf: *mut CONF, -+ ctx: *mut X509V3_CTX, -+ ext_nid: c_int, -+ value: *const c_char, -+ ) -> *mut X509_EXTENSION; -+ pub fn X509V3_EXT_nconf( -+ conf: *mut CONF, -+ ctx: *mut X509V3_CTX, -+ name: *const c_char, -+ value: *const c_char, -+ ) -> *mut X509_EXTENSION; -+ } -+ } else { -+ extern "C" { -+ pub fn X509V3_EXT_nconf_nid( -+ conf: *mut CONF, -+ ctx: *mut X509V3_CTX, -+ ext_nid: c_int, -+ value: *mut c_char, -+ ) -> *mut X509_EXTENSION; -+ pub fn X509V3_EXT_nconf( -+ conf: *mut CONF, -+ ctx: *mut X509V3_CTX, -+ name: *mut c_char, -+ value: *mut c_char, -+ ) -> *mut X509_EXTENSION; -+ } -+ } -+} -+ -+extern "C" { -+ pub fn X509_check_issued(issuer: *mut X509, subject: *mut X509) -> c_int; -+ -+ pub fn X509V3_set_nconf(ctx: *mut X509V3_CTX, conf: *mut CONF); -+ -+ pub fn X509V3_set_ctx( -+ ctx: *mut X509V3_CTX, -+ issuer: *mut X509, -+ subject: *mut X509, -+ req: *mut X509_REQ, -+ crl: *mut X509_CRL, -+ flags: c_int, -+ ); -+ -+ pub fn X509_get1_ocsp(x: *mut X509) -> *mut stack_st_OPENSSL_STRING; -+} Index: lang/rust/files/patch-src_vendor_openssl_build.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl_build.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- src/vendor/openssl/build.rs.orig 2018-09-11 04:49:47 UTC -+++ src/vendor/openssl/build.rs -@@ -49,5 +49,9 @@ fn main() { - if version >= 0x2_07_03_00_0 { - println!("cargo:rustc-cfg=libressl273"); - } -+ -+ if version >= 0x2_08_00_00_0 { -+ println!("cargo:rustc-cfg=libressl280"); -+ } - } - } Index: lang/rust/files/patch-src_vendor_openssl_src_ssl_callbacks.rs =================================================================== --- lang/rust/files/patch-src_vendor_openssl_src_ssl_callbacks.rs +++ /dev/null @@ -1,39 +0,0 @@ ---- src/vendor/openssl/src/ssl/callbacks.rs.orig 2018-09-11 04:49:47 UTC -+++ src/vendor/openssl/src/ssl/callbacks.rs -@@ -381,10 +381,13 @@ pub unsafe extern "C" fn raw_remove_session( - callback(ctx, session) - } - --#[cfg(ossl110)] --type DataPtr = *const c_uchar; --#[cfg(not(ossl110))] --type DataPtr = *mut c_uchar; -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ type DataPtr = *const c_uchar; -+ } else { -+ type DataPtr = *mut c_uchar; -+ } -+} - - pub unsafe extern "C" fn raw_get_session( - ssl: *mut ffi::SSL, -@@ -505,11 +508,13 @@ where - } - } - --#[cfg(ossl110)] --type CookiePtr = *const c_uchar; -- --#[cfg(not(ossl110))] --type CookiePtr = *mut c_uchar; -+cfg_if! { -+ if #[cfg(any(ossl110, libressl280))] { -+ type CookiePtr = *const c_uchar; -+ } else { -+ type CookiePtr = *mut c_uchar; -+ } -+} - - pub extern "C" fn raw_cookie_verify( - ssl: *mut ffi::SSL,