Skip to content

Commit a40e1d3

Browse files
authored
chore: add contributor to readme and fix ci (#305)
* add contributor to README Signed-off-by: Michael Lodder <redmike7@gmail.com> * fix install OpenSSL Signed-off-by: Michael Lodder <redmike7@gmail.com> * fix Dilithium missing bug Signed-off-by: Michael Lodder <redmike7@gmail.com> * find OPENSSL dir Signed-off-by: Michael Lodder <redmike7@gmail.com> --------- Signed-off-by: Michael Lodder <redmike7@gmail.com>
1 parent 4862ffb commit a40e1d3

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,33 @@ jobs:
4646
if: startsWith(matrix.os, 'windows')
4747
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
4848

49+
- name: Install OpenSSL
50+
if: startsWith(matrix.os, 'windows')
51+
run: |
52+
if (-not (Test-Path "C:/Program Files/OpenSSL")) {
53+
if (Get-Command choco -ErrorAction SilentlyContinue) {
54+
choco install openssl -y
55+
} elseif (Get-Command winget -ErrorAction SilentlyContinue) {
56+
winget install --id ShiningLight.OpenSSL --accept-source-agreements --accept-package-agreements
57+
} else {
58+
throw "Neither choco nor winget found to install OpenSSL"
59+
}
60+
}
61+
4962
- name: Set OPENSSL_ROOT_DIR
5063
if: startsWith(matrix.os, 'windows')
51-
run: echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL" >> $env:GITHUB_ENV
64+
run: |
65+
$opensslRoot = "C:/Program Files/OpenSSL"
66+
echo "OPENSSL_ROOT_DIR=$opensslRoot" >> $env:GITHUB_ENV
67+
# Find the actual library directory (Chocolatey puts it in lib/VC/x64/MD or similar)
68+
$libcrypto = Get-ChildItem -Path $opensslRoot -Recurse -Filter "libcrypto.lib" -ErrorAction SilentlyContinue | Select-Object -First 1
69+
if ($libcrypto) {
70+
$libDir = $libcrypto.DirectoryName
71+
echo "OPENSSL_LIB_DIR=$libDir" >> $env:GITHUB_ENV
72+
echo "Found OpenSSL lib at: $libDir"
73+
} else {
74+
echo "Warning: libcrypto.lib not found under $opensslRoot"
75+
}
5276
5377
- name: Set OPENSSL_ROOT_DIR
5478
if: startsWith(matrix.os, 'macos')

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ The Open Quantum Safe project is led by [Douglas Stebila](https://www.douglas.st
170170

171171
liboqs-rust was developed by [Thom Wiggers](https://thomwiggers.nl) at Radboud University.
172172

173+
Contributors to this repo include:
174+
175+
- Mike Lodder (Tectonic Labs)
176+
173177
### Support
174178

175179
Financial support for the development of Open Quantum Safe has been provided by Amazon Web Services and the Canadian Centre for Cyber Security.

oqs-sys/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ kyber = []
4141
ml_kem = []
4242
ntruprime = []
4343
# algorithms: Signature schemes
44-
sigs = ["cross", "dilithium", "falcon", "mayo", "ml_dsa", "sphincs", "uov"]
44+
sigs = ["cross", "falcon", "mayo", "ml_dsa", "sphincs", "uov"]
4545
cross = []
46-
dilithium = []
4746
falcon = []
4847
mayo = []
4948
ml_dsa = []

oqs-sys/build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ fn build_from_source() -> PathBuf {
7676

7777
// signature schemes
7878
algorithm_feature!("SIG", "cross");
79-
algorithm_feature!("SIG", "dilithium");
8079
algorithm_feature!("SIG", "falcon");
8180
algorithm_feature!("SIG", "mayo");
8281
algorithm_feature!("SIG", "ml_dsa");
@@ -112,7 +111,11 @@ fn build_from_source() -> PathBuf {
112111
config.define("OPENSSL_ROOT_DIR", vendored_openssl_root);
113112
} else if cfg!(feature = "openssl") {
114113
println!("cargo:rerun-if-env-changed=OPENSSL_ROOT_DIR");
115-
if let Ok(dir) = std::env::var("OPENSSL_ROOT_DIR") {
114+
println!("cargo:rerun-if-env-changed=OPENSSL_LIB_DIR");
115+
// OPENSSL_LIB_DIR takes precedence if set (useful for Windows where libs are in subdirs)
116+
if let Ok(dir) = std::env::var("OPENSSL_LIB_DIR") {
117+
println!("cargo:rustc-link-search={}", dir);
118+
} else if let Ok(dir) = std::env::var("OPENSSL_ROOT_DIR") {
116119
let dir = Path::new(&dir).join("lib");
117120
println!("cargo:rustc-link-search={}", dir.display());
118121
} else if cfg!(target_os = "windows") || cfg!(target_os = "macos") {

oqs/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ kyber = ["oqs-sys/kyber"]
3636
ml_kem = ["oqs-sys/ml_kem"]
3737
ntruprime = ["oqs-sys/ntruprime"]
3838
# algorithms: Signature schemes
39-
sigs = ["oqs-sys/sigs", "cross", "dilithium", "falcon", "mayo", "ml_dsa", "sphincs", "uov"]
39+
sigs = ["oqs-sys/sigs", "cross", "falcon", "mayo", "ml_dsa", "sphincs", "uov"]
4040
cross = ["oqs-sys/cross"]
41-
dilithium = ["oqs-sys/dilithium"]
4241
falcon = ["oqs-sys/falcon"]
4342
mayo = ["oqs-sys/mayo"]
4443
ml_dsa = ["oqs-sys/ml_dsa"]

oqs/src/sig.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ implement_sigs! {
202202
("cross") CrossRsdpg256Balanced: OQS_SIG_alg_cross_rsdpg_256_balanced,
203203
("cross") CrossRsdpg256Fast: OQS_SIG_alg_cross_rsdpg_256_fast,
204204
("cross") CrossRsdpg256Small: OQS_SIG_alg_cross_rsdpg_256_small,
205-
("dilithium") Dilithium2: OQS_SIG_alg_dilithium_2,
206-
("dilithium") Dilithium3: OQS_SIG_alg_dilithium_3,
207-
("dilithium") Dilithium5: OQS_SIG_alg_dilithium_5,
208205
("falcon") Falcon512: OQS_SIG_alg_falcon_512,
209206
("falcon") Falcon1024: OQS_SIG_alg_falcon_1024,
210207
("mayo") Mayo1: OQS_SIG_alg_mayo_1,

0 commit comments

Comments
 (0)