Add nettle to the CI matrix

This commit is contained in:
Alex Chernyakhovsky
2022-06-27 19:06:55 -04:00
committed by Alex Chernyakhovsky
parent 13d73a6144
commit e5e62b4c76
2 changed files with 13 additions and 3 deletions
+8 -3
View File
@@ -9,13 +9,18 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [macos-latest, ubuntu-18.04, ubuntu-20.04] os: [macos-latest, ubuntu-18.04, ubuntu-20.04]
crypto: [auto]
include:
- crypto: nettle
os: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: "setup linux build environment" - name: "setup linux build environment"
if: ${{ startsWith(matrix.os, 'ubuntu') }} if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo apt install -y protobuf-compiler libprotobuf-dev libutempter-dev autoconf automake run: sudo apt install -y protobuf-compiler libprotobuf-dev libutempter-dev autoconf automake nettle-dev
- name: "setup macos build environment" - name: "setup macos build environment"
if: ${{ startsWith(matrix.os, 'macos') }} if: ${{ startsWith(matrix.os, 'macos') }}
@@ -24,8 +29,8 @@ jobs:
- name: "generate build scripts" - name: "generate build scripts"
run: ./autogen.sh run: ./autogen.sh
- name: "configure" - name: ${{ format('configure (crypto {0})', matrix.crypto) }}
run: ./configure --enable-compile-warnings=error --enable-examples run: ./configure --enable-compile-warnings=error --enable-examples ${{ (matrix.crypto != 'auto' && format('--with-crypto-library={0}', matrix.crypto)) || '' }}
- name: "build" - name: "build"
run: make V=1 run: make V=1
+5
View File
@@ -467,6 +467,9 @@ static inline void AES_ecb_decrypt_blks(block *blks, unsigned nblks, AES_KEY *ke
#elif USE_NETTLE_AES #elif USE_NETTLE_AES
/*-------------------*/ /*-------------------*/
// TODO(Issue 1202): Stop using deprecated nettle APIs
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <nettle/aes.h> #include <nettle/aes.h>
typedef struct aes_ctx AES_KEY; typedef struct aes_ctx AES_KEY;
@@ -502,6 +505,8 @@ static inline void AES_ecb_decrypt_blks(block *blks, unsigned nblks, AES_KEY *ke
#define BPI 4 /* Number of blocks in buffer per ECB call */ #define BPI 4 /* Number of blocks in buffer per ECB call */
#pragma GCC diagnostic pop
#else #else
#error "No AES implementation selected." #error "No AES implementation selected."
#endif #endif