From 65cb395599ec261f7d1c7d3a973f94d0dc848b22 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 13 Mar 2024 12:11:44 +0200 Subject: [PATCH 1/3] add a command line option to output table in Markdown format (#372) Fixes #371 --- interop.py | 5 +++++ run.py | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/interop.py b/interop.py index 8013c815..0a7126d7 100644 --- a/interop.py +++ b/interop.py @@ -48,6 +48,7 @@ class InteropRunner: _tests = [] _measurements = [] _output = "" + _markdown = False _log_dir = "" _save_files = False @@ -58,6 +59,7 @@ def __init__( tests: List[testcases.TestCase], measurements: List[testcases.Measurement], output: str, + markdown: bool, debug: bool, save_files=False, log_dir="", @@ -76,6 +78,7 @@ def __init__( self._client_server_pairs = client_server_pairs self._implementations = implementations self._output = output + self._markdown = markdown self._log_dir = log_dir self._save_files = save_files if len(self._log_dir) == 0: @@ -187,6 +190,8 @@ def get_letters(result): if len(self._tests) > 0: t = prettytable.PrettyTable() + if self._markdown: + t.set_style(prettytable.MARKDOWN) t.hrules = prettytable.ALL t.vrules = prettytable.ALL rows = {} diff --git a/run.py b/run.py index 0cf3b91e..4564681f 100755 --- a/run.py +++ b/run.py @@ -65,6 +65,14 @@ def get_args(): parser.add_argument( "-j", "--json", help="output the matrix to file in json format" ) + parser.add_argument( + "-m", + "--markdown", + help="output the matrix in Markdown format", + action="store_const", + const=True, + default=False, + ) parser.add_argument( "-i", "--must-include", @@ -149,6 +157,7 @@ def get_tests_and_measurements( tests=t[0], measurements=t[1], output=get_args().json, + markdown=get_args().markdown, debug=get_args().debug, log_dir=get_args().log_dir, save_files=get_args().save_files, From 3059fdeb1831bcc871dc969d88b39c057990bff8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:42:11 +0930 Subject: [PATCH 2/3] ci: bump burnett01/rsync-deployments from v6.0.0 to v7.0.0 (#370) * Bump burnett01/rsync-deployments Bumps [burnett01/rsync-deployments](https://github.com/burnett01/rsync-deployments) from c04732dab25a8b2c000b7198a067bf26e93959e2 to e1c5b900e976bbc2a6aadf7fd85d7bef67ede4f1. - [Release notes](https://github.com/burnett01/rsync-deployments/releases) - [Commits](https://github.com/burnett01/rsync-deployments/compare/c04732dab25a8b2c000b7198a067bf26e93959e2...e1c5b900e976bbc2a6aadf7fd85d7bef67ede4f1) --- updated-dependencies: - dependency-name: burnett01/rsync-deployments dependency-type: direct:production ... Signed-off-by: dependabot[bot] * fix version comment --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marten Seemann --- .github/workflows/deploy.yml | 2 +- .github/workflows/interop.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2b99846b..d5499b2c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Upload website to interop.seemann.io - uses: burnett01/rsync-deployments@c04732dab25a8b2c000b7198a067bf26e93959e2 # v6.0.0 + uses: burnett01/rsync-deployments@e1c5b900e976bbc2a6aadf7fd85d7bef67ede4f1 # v7.0.0 with: switches: -avzr --delete path: web/ diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index f7e7fd91..223106fb 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -230,7 +230,7 @@ jobs: find logs_measurement -depth -name "server" -type d -exec rm -r "{}" \; mv logs_measurement/${{ matrix.server }}_${{ matrix.client }}/* logs/${{ matrix.server }}_${{ matrix.client }}/ - name: Upload logs to interop.seemann.io - uses: burnett01/rsync-deployments@c04732dab25a8b2c000b7198a067bf26e93959e2 # v6.0.0 + uses: burnett01/rsync-deployments@e1c5b900e976bbc2a6aadf7fd85d7bef67ede4f1 # v7.0.0 if: ${{ github.event_name == 'schedule' }} with: switches: -avzr --relative @@ -278,7 +278,7 @@ jobs: name: result-aggregated path: result.json - name: Upload logs to interop.seemann.io - uses: burnett01/rsync-deployments@c04732dab25a8b2c000b7198a067bf26e93959e2 # v6.0.0 + uses: burnett01/rsync-deployments@e1c5b900e976bbc2a6aadf7fd85d7bef67ede4f1 # v7.0.0 if: ${{ github.event_name == 'schedule' }} with: switches: -avzr From c3fe2e82c23d8202e691263616fc880b00e05bfa Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 22 Mar 2024 16:01:03 +1000 Subject: [PATCH 3/3] switch certificates to ECDSA, limit validity to 10 days (#373) --- certs.sh | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/certs.sh b/certs.sh index 5e14c8bf..603dade6 100755 --- a/certs.sh +++ b/certs.sh @@ -2,7 +2,7 @@ set -e -if [ -z "$1" ] || [ -z "$2" ] ; then +if [ -z "$1" ] || [ -z "$2" ]; then echo "$0 " exit 1 fi @@ -10,48 +10,51 @@ fi CERTDIR=$1 CHAINLEN=$2 -mkdir -p $CERTDIR || true +mkdir -p "$CERTDIR" || true # Generate Root CA and certificate -openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \ - -keyout $CERTDIR/ca_0.key -out $CERTDIR/cert_0.pem \ +openssl ecparam -name prime256v1 -genkey -out "$CERTDIR"/ca_0.key +openssl req -x509 -sha256 -nodes -days 10 -key "$CERTDIR"/ca_0.key \ + -out "$CERTDIR"/cert_0.pem \ -subj "/O=interop runner Root Certificate Authority/" \ -config cert_config.txt \ -extensions v3_ca \ 2> /dev/null -for i in $(seq 1 $CHAINLEN); do +for i in $(seq 1 "$CHAINLEN"); do # Generate a CSR SUBJ="interop runner intermediate $i" - if [[ $i == $CHAINLEN ]]; then + if [[ $i == "$CHAINLEN" ]]; then SUBJ="interop runner leaf" fi - openssl req -out $CERTDIR/cert.csr -new -newkey rsa:2048 -nodes -keyout $CERTDIR/ca_$i.key \ + + openssl ecparam -name prime256v1 -genkey -out "$CERTDIR"/ca_"$i".key + openssl req -out "$CERTDIR"/cert.csr -new -key "$CERTDIR"/ca_"$i".key -nodes \ -subj "/O=$SUBJ/" \ 2> /dev/null # Sign the certificate - j=$(($i-1)) - if [[ $i < $CHAINLEN ]]; then - openssl x509 -req -sha256 -days 365 -in $CERTDIR/cert.csr -out $CERTDIR/cert_$i.pem \ - -CA $CERTDIR/cert_$j.pem -CAkey $CERTDIR/ca_$j.key -CAcreateserial \ + j=$((i-1)) + if [[ $i < "$CHAINLEN" ]]; then + openssl x509 -req -sha256 -days 10 -in "$CERTDIR"/cert.csr -out "$CERTDIR"/cert_"$i".pem \ + -CA "$CERTDIR"/cert_"$j".pem -CAkey "$CERTDIR"/ca_"$j".key -CAcreateserial \ -extfile cert_config.txt \ -extensions v3_ca \ 2> /dev/null else - openssl x509 -req -sha256 -days 365 -in $CERTDIR/cert.csr -out $CERTDIR/cert_$i.pem \ - -CA $CERTDIR/cert_$j.pem -CAkey $CERTDIR/ca_$j.key -CAcreateserial \ + openssl x509 -req -sha256 -days 10 -in "$CERTDIR"/cert.csr -out "$CERTDIR"/cert_"$i".pem \ + -CA "$CERTDIR"/cert_"$j".pem -CAkey "$CERTDIR"/ca_"$j".key -CAcreateserial \ -extfile <(printf "subjectAltName=DNS:server,DNS:server4,DNS:server6,DNS:server46") \ 2> /dev/null fi done -mv $CERTDIR/cert_0.pem $CERTDIR/ca.pem -cp $CERTDIR/ca_$CHAINLEN.key $CERTDIR/priv.key +mv "$CERTDIR"/cert_0.pem "$CERTDIR"/ca.pem +cp "$CERTDIR"/ca_"$CHAINLEN".key "$CERTDIR"/priv.key # combine certificates -for i in $(seq $CHAINLEN -1 1); do - cat $CERTDIR/cert_$i.pem >> $CERTDIR/cert.pem - rm $CERTDIR/cert_$i.pem $CERTDIR/ca_$i.key +for i in $(seq "$CHAINLEN" -1 1); do + cat "$CERTDIR"/cert_"$i".pem >> "$CERTDIR"/cert.pem + rm "$CERTDIR"/cert_"$i".pem "$CERTDIR"/ca_"$i".key done -rm -f $CERTDIR/*.srl $CERTDIR/ca_0.key $CERTDIR/cert.csr +rm -f "$CERTDIR"/*.srl "$CERTDIR"/ca_0.key "$CERTDIR"/cert.csr