Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 691106b

Browse files
authored
Upgrade to OpenSSL v3.0.0 (alexcrichton#102)
* Upgrade to OpenSSL v3.0.0 Signed-off-by: Nick Thomas <[email protected]> * No longer apply musl patches
1 parent 164696d commit 691106b

File tree

3 files changed

+7
-25
lines changed

3 files changed

+7
-25
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openssl-src"
3-
version = "111.16.0+1.1.1l"
3+
version = "300.0.0+3.0.0"
44
authors = ["Alex Crichton <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"

openssl

Submodule openssl updated 8938 files

src/lib.rs

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ impl Build {
129129
let inner_dir = build_dir.join("src");
130130
fs::create_dir_all(&inner_dir).unwrap();
131131
cp_r(&source_dir(), &inner_dir);
132-
apply_patches(target, &inner_dir);
133132

134133
let perl_program =
135134
env::var("OPENSSL_SRC_PERL").unwrap_or(env::var("PERL").unwrap_or("perl".to_string()));
@@ -152,7 +151,11 @@ impl Build {
152151
// Nothing related to zlib please
153152
.arg("no-comp")
154153
.arg("no-zlib")
155-
.arg("no-zlib-dynamic");
154+
.arg("no-zlib-dynamic")
155+
// Avoid multilib-postfix for build targets that specify it
156+
.arg("--libdir=lib")
157+
// No support for multiple providers yet
158+
.arg("no-legacy");
156159

157160
if cfg!(not(feature = "weak-crypto")) {
158161
configure
@@ -515,27 +518,6 @@ fn cp_r(src: &Path, dst: &Path) {
515518
}
516519
}
517520

518-
fn apply_patches(target: &str, inner: &Path) {
519-
apply_patches_musl(target, inner);
520-
}
521-
522-
fn apply_patches_musl(target: &str, inner: &Path) {
523-
if !target.contains("musl") {
524-
return;
525-
}
526-
527-
// Undo part of https://github.com/openssl/openssl/commit/c352bd07ed2ff872876534c950a6968d75ef121e on MUSL
528-
// since it doesn't have asm/unistd.h
529-
let path = inner.join("crypto/rand/rand_unix.c");
530-
let buf = fs::read_to_string(&path).unwrap();
531-
532-
let buf = buf
533-
.replace("asm/unistd.h", "sys/syscall.h")
534-
.replace("__NR_getrandom", "SYS_getrandom");
535-
536-
fs::write(path, buf).unwrap();
537-
}
538-
539521
fn sanitize_sh(path: &Path) -> String {
540522
if !cfg!(windows) {
541523
return path.to_str().unwrap().to_string();

0 commit comments

Comments
 (0)