-
Notifications
You must be signed in to change notification settings - Fork 712
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
- Add external FIPS 140-2 / 140-3 compliant signatures for the Clam Databases. #1344
Closed
mark-carey-sap
wants to merge
5
commits into
Cisco-Talos:main
from
mark-carey-sap:feature/fips-140-3-compliance
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d233429
- Add external FIPS 140-2 / 140-3 compliant signatures for the Clam D…
mark-carey-sap d64161d
- Updated with clang-format to clean up pipeline issues.
mark-carey-sap e6d93ef
Added cryptographic method flexibility to external signatures. This …
mark-carey-sap bc057fe
Merge branch 'Cisco-Talos:main' into feature/fips-140-3-compliance
mark-carey-sap 90ed3bb
Update libfreshclam/libfreshclam_internal.c
mark-carey-sap 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,38 @@ | ||
/* | ||
* Copyright (C) 2013-2024 Cisco Systems, Inc. and/or its affiliates. All rights reserved. | ||
* Copyright (C) 2011-2013 Sourcefire, Inc. | ||
* | ||
* Authors: aCaB | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef __CRYPTO_H | ||
#define __CRYPTO_H | ||
#include <openssl/opensslv.h> | ||
#include <openssl/evp.h> | ||
|
||
void cli_setup_fips_configuration(void); | ||
int cli_get_fips_mode(void); | ||
|
||
#if OPENSSL_VERSION_MAJOR == 1 | ||
RSA *cli_build_ext_signing_key(unsigned int keytype); | ||
#elif OPENSSL_VERSION_MAJOR == 3 | ||
EVP_PKEY *cli_build_ext_signing_key(unsigned int keytype); | ||
#else | ||
#error "Unsupported OpenSSL version" | ||
#endif | ||
|
||
#endif |
This file contains 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call should not be guarded by cli_fips_mode, external signature file should be preferred if present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur. If we're going to add a better way to validate signing, it should be preferred. We should only fallback to the legacy signature verification if A. the new-style signature is not present and B. not FIPS-mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding comments all over the code to this extent. Every place that guards the validation/fetching of the external signature file with cli_fips_mode should be removed so that the new format is the default and only trusted signature in versions that support it.