1diff --git a/src/cipher.rs b/src/cipher.rs 2index 3926412..6869a4b 100644 3--- a/src/cipher.rs 4+++ b/src/cipher.rs 5@@ -350,11 +350,13 @@ impl Cipher { 6 } 7 8 #[cfg(not(osslconf = "OPENSSL_NO_BF"))] 9+ #[cfg(not(boringssl))] 10 pub fn bf_cfb64() -> &'static CipherRef { 11 unsafe { CipherRef::from_ptr(ffi::EVP_bf_cfb64() as *mut _) } 12 } 13 14 #[cfg(not(osslconf = "OPENSSL_NO_BF"))] 15+ #[cfg(not(boringssl))] 16 pub fn bf_ofb() -> &'static CipherRef { 17 unsafe { CipherRef::from_ptr(ffi::EVP_bf_ofb() as *mut _) } 18 } 19@@ -400,101 +402,121 @@ impl Cipher { 20 } 21 22 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 23+ #[cfg(not(boringssl))] 24 pub fn camellia128_cfb128() -> &'static CipherRef { 25 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_cfb128() as *mut _) } 26 } 27 28 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 29+ #[cfg(not(boringssl))] 30 pub fn camellia128_ecb() -> &'static CipherRef { 31 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_ecb() as *mut _) } 32 } 33 34 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 35+ #[cfg(not(boringssl))] 36 pub fn camellia128_cbc() -> &'static CipherRef { 37 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_cbc() as *mut _) } 38 } 39 40 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 41+ #[cfg(not(boringssl))] 42 pub fn camellia128_ofb() -> &'static CipherRef { 43 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_128_ofb() as *mut _) } 44 } 45 46 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 47+ #[cfg(not(boringssl))] 48 pub fn camellia192_cfb128() -> &'static CipherRef { 49 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_cfb128() as *mut _) } 50 } 51 52 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 53+ #[cfg(not(boringssl))] 54 pub fn camellia192_ecb() -> &'static CipherRef { 55 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_ecb() as *mut _) } 56 } 57 58 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 59+ #[cfg(not(boringssl))] 60 pub fn camellia192_cbc() -> &'static CipherRef { 61 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_cbc() as *mut _) } 62 } 63 64 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 65+ #[cfg(not(boringssl))] 66 pub fn camellia192_ofb() -> &'static CipherRef { 67 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_192_ofb() as *mut _) } 68 } 69 70 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 71+ #[cfg(not(boringssl))] 72 pub fn camellia256_cfb128() -> &'static CipherRef { 73 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_cfb128() as *mut _) } 74 } 75 76 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 77+ #[cfg(not(boringssl))] 78 pub fn camellia256_ecb() -> &'static CipherRef { 79 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_ecb() as *mut _) } 80 } 81 82 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 83+ #[cfg(not(boringssl))] 84 pub fn camellia256_cbc() -> &'static CipherRef { 85 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_cbc() as *mut _) } 86 } 87 88 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 89+ #[cfg(not(boringssl))] 90 pub fn camellia256_ofb() -> &'static CipherRef { 91 unsafe { CipherRef::from_ptr(ffi::EVP_camellia_256_ofb() as *mut _) } 92 } 93 94 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 95+ #[cfg(not(boringssl))] 96 pub fn cast5_cfb64() -> &'static CipherRef { 97 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_cfb64() as *mut _) } 98 } 99 100 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 101+ #[cfg(not(boringssl))] 102 pub fn cast5_ecb() -> &'static CipherRef { 103 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_ecb() as *mut _) } 104 } 105 106 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 107+ #[cfg(not(boringssl))] 108 pub fn cast5_cbc() -> &'static CipherRef { 109 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_cbc() as *mut _) } 110 } 111 112 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 113+ #[cfg(not(boringssl))] 114 pub fn cast5_ofb() -> &'static CipherRef { 115 unsafe { CipherRef::from_ptr(ffi::EVP_cast5_ofb() as *mut _) } 116 } 117 118 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 119+ #[cfg(not(boringssl))] 120 pub fn idea_cfb64() -> &'static CipherRef { 121 unsafe { CipherRef::from_ptr(ffi::EVP_idea_cfb64() as *mut _) } 122 } 123 124 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 125+ #[cfg(not(boringssl))] 126 pub fn idea_ecb() -> &'static CipherRef { 127 unsafe { CipherRef::from_ptr(ffi::EVP_idea_ecb() as *mut _) } 128 } 129 130 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 131+ #[cfg(not(boringssl))] 132 pub fn idea_cbc() -> &'static CipherRef { 133 unsafe { CipherRef::from_ptr(ffi::EVP_idea_cbc() as *mut _) } 134 } 135 136 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 137+ #[cfg(not(boringssl))] 138 pub fn idea_ofb() -> &'static CipherRef { 139 unsafe { CipherRef::from_ptr(ffi::EVP_idea_ofb() as *mut _) } 140 } 141@@ -510,21 +532,25 @@ impl Cipher { 142 } 143 144 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 145+ #[cfg(not(boringssl))] 146 pub fn seed_cbc() -> &'static CipherRef { 147 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cbc() as *mut _) } 148 } 149 150 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 151+ #[cfg(not(boringssl))] 152 pub fn seed_cfb128() -> &'static CipherRef { 153 unsafe { CipherRef::from_ptr(ffi::EVP_seed_cfb128() as *mut _) } 154 } 155 156 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 157+ #[cfg(not(boringssl))] 158 pub fn seed_ecb() -> &'static CipherRef { 159 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ecb() as *mut _) } 160 } 161 162 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 163+ #[cfg(not(boringssl))] 164 pub fn seed_ofb() -> &'static CipherRef { 165 unsafe { CipherRef::from_ptr(ffi::EVP_seed_ofb() as *mut _) } 166 } 167diff --git a/src/ec.rs b/src/ec.rs 168index 67df38f..578cf51 100644 169--- a/src/ec.rs 170+++ b/src/ec.rs 171@@ -196,6 +196,7 @@ impl EcGroupRef { 172 /// using a trinomial or pentanomial. 173 #[corresponds(EC_GROUP_get_curve_GF2m)] 174 #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] 175+ #[cfg(not(boringssl))] 176 pub fn components_gf2m( 177 &self, 178 p: &mut BigNumRef, 179@@ -587,6 +588,7 @@ impl EcPointRef { 180 /// `x` and `y` `BigNum`s 181 #[corresponds(EC_POINT_get_affine_coordinates_GF2m)] 182 #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))] 183+ #[cfg(not(boringssl))] 184 pub fn affine_coordinates_gf2m( 185 &self, 186 group: &EcGroupRef, 187diff --git a/src/hash.rs b/src/hash.rs 188index 01d7097..4caa251 100644 189--- a/src/hash.rs 190+++ b/src/hash.rs 191@@ -158,6 +158,7 @@ impl MessageDigest { 192 } 193 194 #[cfg(not(osslconf = "OPENSSL_NO_RMD160"))] 195+ #[cfg(not(boringssl))] 196 pub fn ripemd160() -> MessageDigest { 197 unsafe { MessageDigest(ffi::EVP_ripemd160()) } 198 } 199diff --git a/src/lib.rs b/src/lib.rs 200index aeae361..42f289b 100644 201--- a/src/lib.rs 202+++ b/src/lib.rs 203@@ -148,7 +148,7 @@ pub mod base64; 204 pub mod bn; 205 pub mod cipher; 206 pub mod cipher_ctx; 207-#[cfg(all(not(libressl), not(osslconf = "OPENSSL_NO_CMS")))] 208+#[cfg(all(not(libressl), not(osslconf = "OPENSSL_NO_CMS"), not(boringssl)))] 209 pub mod cms; 210 pub mod conf; 211 pub mod derive; 212@@ -174,7 +174,7 @@ pub mod md; 213 pub mod md_ctx; 214 pub mod memcmp; 215 pub mod nid; 216-#[cfg(not(osslconf = "OPENSSL_NO_OCSP"))] 217+#[cfg(all(not(osslconf = "OPENSSL_NO_OCSP"), not(boringssl)))] 218 pub mod ocsp; 219 pub mod pkcs12; 220 pub mod pkcs5; 221diff --git a/src/md.rs b/src/md.rs 222index 08e4aac..3ce3c25 100644 223--- a/src/md.rs 224+++ b/src/md.rs 225@@ -187,6 +187,7 @@ impl Md { 226 } 227 228 #[cfg(not(osslconf = "OPENSSL_NO_RMD160"))] 229+ #[cfg(not(boringssl))] 230 #[inline] 231 pub fn ripemd160() -> &'static MdRef { 232 unsafe { MdRef::from_ptr(ffi::EVP_ripemd160() as *mut _) } 233diff --git a/src/symm.rs b/src/symm.rs 234index 4d69996..23b9ce4 100644 235--- a/src/symm.rs 236+++ b/src/symm.rs 237@@ -256,11 +256,13 @@ impl Cipher { 238 } 239 240 #[cfg(not(osslconf = "OPENSSL_NO_BF"))] 241+ #[cfg(not(boringssl))] 242 pub fn bf_cfb64() -> Cipher { 243 unsafe { Cipher(ffi::EVP_bf_cfb64()) } 244 } 245 246 #[cfg(not(osslconf = "OPENSSL_NO_BF"))] 247+ #[cfg(not(boringssl))] 248 pub fn bf_ofb() -> Cipher { 249 unsafe { Cipher(ffi::EVP_bf_ofb()) } 250 } 251@@ -306,81 +308,97 @@ impl Cipher { 252 } 253 254 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 255+ #[cfg(not(boringssl))] 256 pub fn camellia_128_cbc() -> Cipher { 257 unsafe { Cipher(ffi::EVP_camellia_128_cbc()) } 258 } 259 260 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 261+ #[cfg(not(boringssl))] 262 pub fn camellia_128_ecb() -> Cipher { 263 unsafe { Cipher(ffi::EVP_camellia_128_ecb()) } 264 } 265 266 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 267+ #[cfg(not(boringssl))] 268 pub fn camellia_128_ofb() -> Cipher { 269 unsafe { Cipher(ffi::EVP_camellia_128_ofb()) } 270 } 271 272 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 273+ #[cfg(not(boringssl))] 274 pub fn camellia_128_cfb128() -> Cipher { 275 unsafe { Cipher(ffi::EVP_camellia_128_cfb128()) } 276 } 277 278 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 279+ #[cfg(not(boringssl))] 280 pub fn camellia_192_cbc() -> Cipher { 281 unsafe { Cipher(ffi::EVP_camellia_192_cbc()) } 282 } 283 284 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 285+ #[cfg(not(boringssl))] 286 pub fn camellia_192_ecb() -> Cipher { 287 unsafe { Cipher(ffi::EVP_camellia_192_ecb()) } 288 } 289 290 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 291+ #[cfg(not(boringssl))] 292 pub fn camellia_192_ofb() -> Cipher { 293 unsafe { Cipher(ffi::EVP_camellia_192_ofb()) } 294 } 295 296 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 297+ #[cfg(not(boringssl))] 298 pub fn camellia_192_cfb128() -> Cipher { 299 unsafe { Cipher(ffi::EVP_camellia_192_cfb128()) } 300 } 301 302 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 303+ #[cfg(not(boringssl))] 304 pub fn camellia_256_cbc() -> Cipher { 305 unsafe { Cipher(ffi::EVP_camellia_256_cbc()) } 306 } 307 308 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 309+ #[cfg(not(boringssl))] 310 pub fn camellia_256_ecb() -> Cipher { 311 unsafe { Cipher(ffi::EVP_camellia_256_ecb()) } 312 } 313 314 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 315+ #[cfg(not(boringssl))] 316 pub fn camellia_256_ofb() -> Cipher { 317 unsafe { Cipher(ffi::EVP_camellia_256_ofb()) } 318 } 319 320 #[cfg(not(osslconf = "OPENSSL_NO_CAMELLIA"))] 321+ #[cfg(not(boringssl))] 322 pub fn camellia_256_cfb128() -> Cipher { 323 unsafe { Cipher(ffi::EVP_camellia_256_cfb128()) } 324 } 325 326 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 327+ #[cfg(not(boringssl))] 328 pub fn cast5_cbc() -> Cipher { 329 unsafe { Cipher(ffi::EVP_cast5_cbc()) } 330 } 331 332 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 333+ #[cfg(not(boringssl))] 334 pub fn cast5_ecb() -> Cipher { 335 unsafe { Cipher(ffi::EVP_cast5_ecb()) } 336 } 337 338 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 339+ #[cfg(not(boringssl))] 340 pub fn cast5_ofb() -> Cipher { 341 unsafe { Cipher(ffi::EVP_cast5_ofb()) } 342 } 343 344 #[cfg(not(osslconf = "OPENSSL_NO_CAST"))] 345+ #[cfg(not(boringssl))] 346 pub fn cast5_cfb64() -> Cipher { 347 unsafe { Cipher(ffi::EVP_cast5_cfb64()) } 348 } 349@@ -398,41 +416,49 @@ impl Cipher { 350 } 351 352 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 353+ #[cfg(not(boringssl))] 354 pub fn idea_cbc() -> Cipher { 355 unsafe { Cipher(ffi::EVP_idea_cbc()) } 356 } 357 358 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 359+ #[cfg(not(boringssl))] 360 pub fn idea_ecb() -> Cipher { 361 unsafe { Cipher(ffi::EVP_idea_ecb()) } 362 } 363 364 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 365+ #[cfg(not(boringssl))] 366 pub fn idea_ofb() -> Cipher { 367 unsafe { Cipher(ffi::EVP_idea_ofb()) } 368 } 369 370 #[cfg(not(osslconf = "OPENSSL_NO_IDEA"))] 371+ #[cfg(not(boringssl))] 372 pub fn idea_cfb64() -> Cipher { 373 unsafe { Cipher(ffi::EVP_idea_cfb64()) } 374 } 375 376 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 377+ #[cfg(not(boringssl))] 378 pub fn seed_cbc() -> Cipher { 379 unsafe { Cipher(ffi::EVP_seed_cbc()) } 380 } 381 382 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 383+ #[cfg(not(boringssl))] 384 pub fn seed_cfb128() -> Cipher { 385 unsafe { Cipher(ffi::EVP_seed_cfb128()) } 386 } 387 388 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 389+ #[cfg(not(boringssl))] 390 pub fn seed_ecb() -> Cipher { 391 unsafe { Cipher(ffi::EVP_seed_ecb()) } 392 } 393 394 #[cfg(not(osslconf = "OPENSSL_NO_SEED"))] 395+ #[cfg(not(boringssl))] 396 pub fn seed_ofb() -> Cipher { 397 unsafe { Cipher(ffi::EVP_seed_ofb()) } 398 } 399