-
Notifications
You must be signed in to change notification settings - Fork 6
feat(crypto): support OpenSSL 1.1.x with per-version backend files #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
walterchris
wants to merge
10
commits into
main
Choose a base branch
from
engine/crypto-ossl11-compat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d6df228
feat(crypto): add OpenSSL 1.1.x backends for azihsm_crypto
walterchris 535cf48
fix(crypto): correct two OpenSSL 1.1.x backend behaviors
walterchris 22e2d04
ci(engine-matrix): run azihsm_crypto tests against OpenSSL 1.1.x
walterchris 088c5ed
fix(crypto): harden 1.1.x backends to match the 3.x guards
walterchris 3df643e
ci(engine-matrix): run 1.1.x tests via cargo nextest
walterchris a359821
fix(crypto): tighten three 1.1.x backend details
walterchris e2b63fb
docs(crypto): fix stale 1.1.x doc references; pin nextest install
walterchris 8cb22f0
docs(crypto): correct two stale 1.1.x doc comments
walterchris d313064
fix(crypto): match 3.x OAEP empty-label handling; lint 1.1.x backends…
walterchris c0dcdd6
fix(crypto): return actual RSA encrypt length, not the upper bound
walterchris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| //! Emits `cfg(ossl300)` when building against OpenSSL 3.0+ so the crate can | ||
| //! select 3.x-only backends or OpenSSL 1.1.x-compatible code. `openssl-sys` is | ||
| //! a direct dependency declaring `links = "openssl"`, so cargo exposes the | ||
| //! detected version here as `DEP_OPENSSL_VERSION_NUMBER` (hex `MNNFFPPS`). | ||
|
|
||
| /// OpenSSL 3.0.0 as the packed `DEP_OPENSSL_VERSION_NUMBER` value. | ||
| const OPENSSL_3_0_0: u64 = 0x3000_0000; | ||
|
|
||
| fn main() { | ||
| println!("cargo::rustc-check-cfg=cfg(ossl300)"); | ||
| println!("cargo::rerun-if-env-changed=DEP_OPENSSL_VERSION_NUMBER"); | ||
| if let Ok(v) = std::env::var("DEP_OPENSSL_VERSION_NUMBER") | ||
| && let Ok(n) = u64::from_str_radix(&v, 16) | ||
| && n >= OPENSSL_3_0_0 | ||
| { | ||
| println!("cargo::rustc-cfg=ossl300"); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.