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

Add an integration test for NTP #1369

Merged
merged 9 commits into from
Jan 8, 2024
Merged

Add an integration test for NTP #1369

merged 9 commits into from
Jan 8, 2024

Conversation

andrewhop
Copy link
Contributor

Issues:

Resolves CryptoAlg-2187

Description of changes:

With #1354 and #1355 AWS-LC is compatible with the latest version of NTP. This change adds a test to make sure we continue to work.

Call-outs:

AWS-LC already defines OPENSSL_NO_MDC2 in our public header files, however NTP currently doesn't check for that in their digest tests and expects to use MDC2. For now I added a patch to update the test and check OPENSSL_NO_MDC2 is not defined.

NTP does not have an up to date GitHub mirror, it seems like the easiest way to get the code is from https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/. Right now the integration script is hard coded to download 4.2.8p17 which is the latest right now.

Testing:

Built and ran locally.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@andrewhop andrewhop requested a review from a team as a code owner December 20, 2023 19:19
tests/ci/integration/run_ntp_integration.sh Outdated Show resolved Hide resolved
tests/ci/integration/run_ntp_integration.sh Outdated Show resolved Hide resolved
tests/ci/integration/run_ntp_integration.sh Outdated Show resolved Hide resolved
@justsmth justsmth self-requested a review January 4, 2024 17:28
Copy link
Contributor

@justsmth justsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is currently failing due to a missing symbol?

/usr/bin/ld: ../libntp/libntp.a(a_md5encrypt.o): in function `cmac_ctx_size':
/home/runner/work/aws-lc/aws-lc/NTP_BUILD_ROOT/ntp-4.2.8p17/libntp/a_md5encrypt.c:35: undefined reference to `CMAC_CTX_get0_cipher_ctx'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1110: ntpd] Error 1

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (4d81067) 76.84% compared to head (e1818b3) 76.80%.
Report is 2 commits behind head on main.

Files Patch % Lines
crypto/fipsmodule/cmac/cmac.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1369      +/-   ##
==========================================
- Coverage   76.84%   76.80%   -0.05%     
==========================================
  Files         424      424              
  Lines       71410    71412       +2     
==========================================
- Hits        54876    54846      -30     
- Misses      16534    16566      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

justsmth
justsmth previously approved these changes Jan 5, 2024
@andrewhop andrewhop enabled auto-merge (squash) January 8, 2024 18:17
@andrewhop andrewhop merged commit 1407557 into aws:main Jan 8, 2024
26 of 28 checks passed
dougch pushed a commit to dougch/aws-lc that referenced this pull request Jan 30, 2024
Add CMAC_CTX_get0_cipher_ctx for NTP, and add an integration test that builds NTP with AWS-LC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants