-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from nasa/88-add-github-automated-build-integ…
…ration-tests-for-sadb-mariadb-interface-1 88 add GitHub automated build integration tests for sadb mariadb interface 1
- Loading branch information
Showing
6 changed files
with
611 additions
and
1 deletion.
There are no files selected for viewing
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,40 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main,dev ] | ||
pull_request: | ||
|
||
jobs: | ||
mariadb_build: | ||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | ||
# You can convert this to a matrix build if you need cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ubuntu-latest | ||
container: rbrown00/cryptolib:latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}/build -DDEBUG=1 -DMYSQL=1 -DLIBGCRYPT=1 -DKMCCRYPTO=0 | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build | ||
|
||
- name: Initailize SADB | ||
working-directory: ${{github.workspace}}/build | ||
#Maybe create a variable for this SQL location | ||
run: | | ||
cd /__w/CryptoLib/CryptoLib/src/crypto_sadb/sadb_mariadb_sql | ||
echo "----------------" | ||
/etc/init.d/mysql start | ||
mysql --host=localhost -uroot -pitc123! < delete_sadb.sql | ||
mysql --host=localhost -uroot -pitc123! < create_sadb.sql | ||
mysql --host=localhost -uroot -pitc123! < create_sadb_user_grant_permissions.sql | ||
mysql --host=localhost -uroot -pitc123! < create_sadb_jpl_unit_test_security_associations.sql | ||
cd /__w/CryptoLib/CryptoLib/build/bin | ||
./ut_mariadb | ||
# mysql --host=localhost -uroot -pitc123! < create_sadb_unit_test_security_associations.sql |
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
22 changes: 22 additions & 0 deletions
22
src/crypto_sadb/sadb_mariadb_sql/create_sadb_ivv_unit_tests.sql
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,22 @@ | ||
USE sadb; | ||
|
||
-- SCID 44 (MMT) Security Associations AES/GCM/NoPadding -- | ||
-- SA 1 - OPERATIONAL; ENC + AUTH - ARSNW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0 | ||
INSERT INTO security_associations (spi,ekid,sa_state,ecs,est,ast,shivf_len,iv_len,stmacf_len,iv,abm_len,abm,arsnw,arsn_len,tfvn,scid,vcid,mapid) | ||
VALUES (1,'itc/test/key1',3,X'01',1,1,12,12,16,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',5,0,0,44,0,0); | ||
|
||
-- SA 2 - OPERATIONAL; ENC; ARSNW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0 | ||
INSERT INTO security_associations (spi,ekid,sa_state,ecs,est,ast,shivf_len,iv_len,stmacf_len,iv,abm_len,abm,arsnw,arsn_len,tfvn,scid,vcid,mapid) | ||
VALUES (2,'itc/test/key2',3,X'01',1,0,12,12,16,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',5,0,0,3,0,0); | ||
|
||
-- SA 3 - OPERATIONAL; ENC; ARSNW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0 | ||
INSERT INTO security_associations (spi,ekid,sa_state,ecs,est,ast,shivf_len,iv_len,stmacf_len,iv,abm_len,abm,arsnw,arsn_len,tfvn,scid,vcid,mapid) | ||
VALUES (3,'itc/test/key3',3,X'01',1,1,12,12,16,X'000000000000000000000001',20,X'0000000000000000000000000000000000000000',5,0,0,3,1,0); | ||
|
||
-- SA 4 - OPERATIONAL; ENC; ARSNW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0 | ||
INSERT INTO security_associations (spi,ekid,sa_state,ecs,est,ast,shivf_len,iv_len,stmacf_len,iv,abm_len,abm,arsnw,arsn_len,tfvn,scid,vcid,mapid) | ||
VALUES (4,'itc/test/key4',3,X'01',1,1,6,12,16,X'000000000000FFFFFFFFFFFC',20,X'0000000000000000000000000000000000000000',5,0,0,3,2,0); | ||
|
||
-- SA 5 - OPERATIONAL; ENC; ARSNW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0 | ||
INSERT INTO security_associations (spi,ekid,sa_state,ecs,est,ast,shivf_len,iv_len,stmacf_len,iv,abm_len,abm,arsnw,arsn_len,arsn,tfvn,scid,vcid,mapid,ecs_len,acs_len,acs,shsnf_len) | ||
VALUES (5,'itc/test/key5',3,X'01',0,1,12,12,16,X'000000000000000000000001',36,X'000000000000000000000000000000000000000000000000000000000000000000000000',5,3,X'05FFFC',0,3,3,0,1,1,X'01',2); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* Copyright (C) 2009 - 2022 National Aeronautics and Space Administration. | ||
All Foreign Rights are Reserved to the U.S. Government. | ||
This software is provided "as is" without any warranty of any kind, either expressed, implied, or statutory, | ||
including, but not limited to, any warranty that the software will conform to specifications, any implied warranties | ||
of merchantability, fitness for a particular purpose, and freedom from infringement, and any warranty that the | ||
documentation will conform to the program, or any warranty that the software will be error free. | ||
In no event shall NASA be liable for any damages, including, but not limited to direct, indirect, special or | ||
consequential damages, arising out of, resulting from, or in any way connected with the software or its | ||
documentation, whether or not based upon warranty, contract, tort or otherwise, and whether or not loss was sustained | ||
from, or arose out of the results of, or use of, the software, documentation or services provided hereunder. | ||
ITC Team | ||
NASA IV&V | ||
[email protected] | ||
*/ | ||
|
||
#ifndef CRYPTOLIB_UT_MARIADB_H | ||
#define CRYPTOLIB_UT_MARIADB_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#include "crypto.h" | ||
#include "shared_util.h" | ||
#include <stdio.h> | ||
|
||
#ifdef __cplusplus | ||
} /* Close scope of 'extern "C"' declaration which encloses file. */ | ||
#endif | ||
|
||
#endif // CRYPTOLIB_UT_MARIA_DB_H |
Oops, something went wrong.