Skip to content
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

CryptoPkg: Require exact crypto version match #1157

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CryptoPkg/Library/BaseCryptLibOnProtocolPpi/DxeCryptLib.c
Javagedes marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ DxeCryptLibConstructor (
}

Version = mCryptoProtocol->GetVersion ();
if (Version < EDKII_CRYPTO_VERSION) {
if (Version != EDKII_CRYPTO_VERSION) {
DEBUG ((DEBUG_ERROR, "[DxeCryptLib] Crypto Protocol unsupported version %d\n", Version));
ASSERT (Version >= EDKII_CRYPTO_VERSION);
ASSERT (Version == EDKII_CRYPTO_VERSION);
mCryptoProtocol = NULL;
return EFI_NOT_FOUND;
}
Expand Down
4 changes: 2 additions & 2 deletions CryptoPkg/Library/BaseCryptLibOnProtocolPpi/PeiCryptLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ GetCryptoServices (
}

Version = CryptoPpi->GetVersion ();
if (Version < EDKII_CRYPTO_VERSION) {
if (Version != EDKII_CRYPTO_VERSION) {
DEBUG ((DEBUG_ERROR, "[PeiCryptLib] Crypto PPI unsupported version %d\n", Version));
ASSERT (Version >= EDKII_CRYPTO_VERSION);
ASSERT (Version == EDKII_CRYPTO_VERSION);
return NULL;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ RuntimeDxeCryptLibConstructor (
}

Version = mCryptoProtocol->GetVersion ();
if (Version < EDKII_CRYPTO_VERSION) {
if (Version != EDKII_CRYPTO_VERSION) {
DEBUG ((DEBUG_ERROR, "[%a] Crypto Protocol unsupported version %u.\n", __func__, Version));
ASSERT (Version >= EDKII_CRYPTO_VERSION);
ASSERT (Version == EDKII_CRYPTO_VERSION);
mCryptoProtocol = NULL;
return EFI_NOT_FOUND;
}
Expand Down
4 changes: 2 additions & 2 deletions CryptoPkg/Library/BaseCryptLibOnProtocolPpi/SmmCryptLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ SmmCryptLibConstructor (
}

Version = mSmmCryptoProtocol->GetVersion ();
if (Version < EDKII_CRYPTO_VERSION) {
if (Version != EDKII_CRYPTO_VERSION) {
DEBUG ((DEBUG_ERROR, "[SmmCryptLib] Crypto SMM Protocol unsupported version %d\n", Version));
ASSERT (Version >= EDKII_CRYPTO_VERSION);
ASSERT (Version == EDKII_CRYPTO_VERSION);
mSmmCryptoProtocol = NULL;
return EFI_NOT_FOUND;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ StandaloneMmCryptLibConstructor (
}

Version = mSmmCryptoProtocol->GetVersion ();
if (Version < EDKII_CRYPTO_VERSION) {
if (Version != EDKII_CRYPTO_VERSION) {
DEBUG ((DEBUG_ERROR, "[StandaloneMmCryptLib] Crypto SMM Protocol unsupported version %d\n", Version));
ASSERT (Version >= EDKII_CRYPTO_VERSION);
ASSERT (Version == EDKII_CRYPTO_VERSION);
mSmmCryptoProtocol = NULL;
return EFI_NOT_FOUND;
}
Expand Down
Loading