-
Notifications
You must be signed in to change notification settings - Fork 3
Add nat20 integration test suite for linux examples #105
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
werwurm
wants to merge
66
commits into
main
Choose a base branch
from
werwurm/linux_example_integration_test
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
66 commits
Select commit
Hold shift + click to select a range
67ca3fc
Add nat20lib kernel module example and br environment.
werwurm 4070f76
Fixup lint and add Makefiles to license checker.
werwurm de1ea2a
Make bootstrap executable
werwurm 36bc192
Use prebuild toolchain and stop building qemu from scratch.
werwurm 44c8f8f
address comments and also resolve circular dependency when using OVER…
werwurm 6627ce3
Do not use relative paths
werwurm edbd436
Add module nat20device to linux examples.
werwurm 2fd948f
Add nat20device to linux-kmod-build github action.
werwurm b9669af
nat20device fixups
werwurm d40b5bf
Add nat20crypto module to linux examples
werwurm 49d4901
Set override SRCDIR for dependencies.
werwurm 4b64988
Address comments.
werwurm b1899da
Merge branch 'refs/heads/werwurm/linux_example_nat20lib' into werwurm…
werwurm fee93e2
address comments
werwurm e5a7001
Serialize read and write access and document concurrency contracts.
werwurm b491dbb
Add macro for max instances
werwurm 6062a0b
Merge branch 'refs/heads/werwurm/linux_example_nat20device' into werw…
werwurm 1afed43
Update license in package config.
werwurm 0eae0d8
tidy
werwurm 47f9055
Add SECURITY.md and fix some issues.
werwurm 6a47870
fix error handling contract.
werwurm 54014fd
address comments
werwurm f645788
fixup KBuild
werwurm b621371
fixups
werwurm b7b57a6
fix error path
werwurm 502f49c
fix non standard deterministic DSA construction
werwurm f5e6efd
Change shash initialization order
werwurm 3ded408
typo
werwurm 1957cd9
Merge branch 'werwurm/linux_example_nat20lib' into werwurm/linux_exam…
werwurm 7fd4b5b
Merge branch 'main' into werwurm/linux_example_nat20device
werwurm 424d872
Merge branch 'refs/heads/werwurm/linux_example_nat20device' into werw…
werwurm 94a513c
address comments
werwurm 49f3f1a
Merge branch 'main' into werwurm/linux_example_nat20crypto
werwurm f7b2bd3
Fix result size estimation.
werwurm c10d616
Fix underestimating size when overflowing after signing.
werwurm bf7e663
add test for underestimate after signing
werwurm 13a4a4c
Merge branch 'werwurm/linux_example_nat20crypto' into werwurm/fix_cer…
werwurm f89cb70
Add nat20sw kernel module to linux examples.
werwurm f5285c6
address comments
werwurm 8f306bb
Address comments.
werwurm 080638f
Add libnat20 as buildroot package to the linux example.
werwurm fb0a11a
Merge branch 'werwurm/linux_example_nat20crypto' into werwurm/fix_cer…
werwurm 0180dd9
Merge branch 'main' into werwurm/fix_certificate_size_estimates
werwurm d7d13bb
Merge branch 'werwurm/fix_certificate_size_estimates' into werwurm/li…
werwurm 8808749
Merge branch 'main' into werwurm/linux_example_nat20sw
werwurm 600e630
address comments
werwurm 8b52e5f
Merge branch 'werwurm/linux_example_nat20sw' into werwurm/linux_examp…
werwurm 1492110
address comments
werwurm dfc343c
Merge branch 'refs/heads/werwurm/linux_example_nat20sw' into werwurm/…
werwurm 4be3210
Address comments
werwurm f3f0549
Make nat20sw.mk consistent
werwurm 6bbee61
Merge branch 'refs/heads/werwurm/linux_example_nat20sw' into werwurm/…
werwurm 7ffea18
address comments
werwurm 42b2c9e
Merge branch 'werwurm/linux_example_nat20sw' into werwurm/linux_examp…
werwurm 0612f25
Add nat20cli command line tool for nat20device.
werwurm b7a2f03
Address comments
werwurm 47500a2
Add nat20 integration test suite for linux examples
werwurm 8e3063f
Apply suggestions from code review
werwurm bb95742
address comments
werwurm 2eac3fb
fix comma swallowing portability issue
werwurm b159fbb
Revert "Add nat20cli command line tool for nat20device."
werwurm 839b180
Merge branch 'werwurm/linux_example_nat20sw' into werwurm/linux_examp…
werwurm 3cfbb32
Merge branch 'main' into werwurm/linux_example_libnat20
werwurm 8739753
Merge branch 'werwurm/linux_example_libnat20' into werwurm/linux_exam…
werwurm 89d1814
Tidy test runner
werwurm a194dff
Merge branch 'main' into werwurm/linux_example_integration_test
werwurm 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 |
|---|---|---|
|
|
@@ -49,4 +49,3 @@ build/ | |
| cmake_install.cmake | ||
| compile_commands.json | ||
| html/ | ||
| nat20test | ||
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
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,42 @@ | ||
| # Copyright 2026 Aurora Operations, Inc. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0 | ||
| # | ||
| # This work is dual licensed. | ||
| # You may use it under Apache-2.0 or GPL-2.0 at your option. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # OR | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation; either version 2 | ||
| # of the License, or (at your option) any later version. | ||
| # | ||
| # 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, see | ||
| # <https://www.gnu.org/licenses/>. | ||
|
|
||
| config BR2_PACKAGE_NAT20TEST | ||
| bool "nat20test" | ||
| depends on BR2_PACKAGE_LIBNAT20 | ||
| depends on BR2_PACKAGE_OPENSSL | ||
|
werwurm marked this conversation as resolved.
|
||
| select BR2_PACKAGE_NAT20SW | ||
| help | ||
| Enable building the nat20test, an integration test for nat20device with nat20sw. | ||
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,51 @@ | ||
| # Copyright 2026 Aurora Operations, Inc. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0 | ||
| # | ||
| # This work is dual licensed. | ||
| # You may use it under Apache-2.0 or GPL-2.0 at your option. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # OR | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation; either version 2 | ||
| # of the License, or (at your option) any later version. | ||
| # | ||
| # 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, see | ||
| # <https://www.gnu.org/licenses/>. | ||
|
|
||
| # In CI NAT20TEST_OVERRIDE_SRCDIR is set to the root of the repository, | ||
| # so that the source under test is always the current branch. | ||
| # Integrators who use this configuration should pin the version | ||
| # to a specific commit or branch to avoid breakages when the main branch changes. | ||
| NAT20TEST_VERSION = origin/main | ||
| NAT20TEST_SITE = https://github.com/aurora-opensource/libnat20.git | ||
| NAT20TEST_SITE_METHOD = git | ||
| NAT20TEST_LICENSE = Apache-2.0 OR GPL-2.0 | ||
| NAT20TEST_LICENSE_FILES = LICENSE-Apache-2.0.txt LICENSE-GPL-2.0.txt | ||
|
|
||
| NAT20TEST_SUBDIR = examples/linux/nat20test | ||
|
|
||
| NAT20TEST_INSTALL_TARGET = YES | ||
| NAT20TEST_DEPENDENCIES += libnat20 openssl | ||
|
werwurm marked this conversation as resolved.
|
||
|
|
||
| $(eval $(cmake-package)) | ||
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,82 @@ | ||
| # Copyright 2026 Aurora Operations, Inc. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0 | ||
| # | ||
| # This work is dual licensed. | ||
| # You may use it under Apache-2.0 or GPL-2.0 at your option. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # OR | ||
| # | ||
| # This program is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU General Public License | ||
| # as published by the Free Software Foundation; either version 2 | ||
| # of the License, or (at your option) any later version. | ||
| # | ||
| # 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, see | ||
| # <https://www.gnu.org/licenses/>. | ||
|
|
||
| cmake_minimum_required(VERSION 3.22) | ||
|
|
||
| project(NAT20TEST VERSION 0.0.1 LANGUAGES C) | ||
|
|
||
| # The C standard shall be C11. | ||
| set(CMAKE_C_STANDARD 11) | ||
|
|
||
| # CMake shall generate a compile_commands.json file for | ||
| # the benefit of clangd based IDE support. | ||
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
|
||
|
|
||
| ################################################################################################### | ||
| # Integration test binary — exercises the nat20 DICE service via /dev/nat200. | ||
| add_executable(nat20_integration_test) | ||
|
|
||
| find_package(LibNat20 REQUIRED) | ||
| find_package(OpenSSL REQUIRED) | ||
|
|
||
| target_sources(nat20_integration_test | ||
| PRIVATE test/nat20_integration_test.c | ||
| PRIVATE test/test_helpers.c | ||
| ) | ||
|
|
||
| target_include_directories(nat20_integration_test | ||
| PRIVATE test | ||
| ) | ||
|
|
||
| target_link_libraries(nat20_integration_test | ||
| PRIVATE LibNat20::nat20 | ||
| PRIVATE LibNat20::nat20_service | ||
| PRIVATE LibNat20::nat20_crypto_nat20 | ||
| PRIVATE OpenSSL::Crypto | ||
| ) | ||
|
|
||
| target_compile_options(nat20_integration_test | ||
| PRIVATE -pedantic | ||
| PRIVATE -Wall | ||
| PRIVATE -Wextra | ||
| PRIVATE -Werror | ||
| ) | ||
|
|
||
| install(TARGETS nat20_integration_test RUNTIME DESTINATION bin) | ||
| install(PROGRAMS nat20test.sh DESTINATION bin) | ||
| install(PROGRAMS nat20test_qemu_init.sh DESTINATION bin) | ||
|
|
||
| ################################################################################################### |
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
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.
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.
These changes are also present in #104. Based on the PR title, I think they should be here.. can you please separate them out so it's more clear?
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.
You are correct, however, this PR is correct, so you should have approved this one and not #104.
Ultimately, both are correct in this respect, I just forgot to change the base on #104 which is supposed to land after this one. I corrected this now.