Skip to content

Commit

Permalink
Merge branch 'wolfSSL:master' into zig-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane authored Feb 12, 2024
2 parents 1baa0c5 + 83ae724 commit 46bb137
Show file tree
Hide file tree
Showing 52 changed files with 1,941 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
name: wolf-install-curl
path: build-dir
retention-days: 1
retention-days: 5

test_curl:
name: ${{ matrix.curl_ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-OpenWrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
name: openwrt-libwolfssl.so
path: src/.libs/libwolfssl.so
retention-days: 1
retention-days: 5
compile_container:
name: Compile container
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hitch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
name: wolf-install-hitch
path: build-dir
retention-days: 1
retention-days: 5

hitch_check:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hostap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
name: ${{ matrix.build_id }}
path: build-dir
retention-days: 1
retention-days: 5

# Build wpa_supplicant with wolfSSL and hostapd with OpenSSL and interop.
hostap_test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/krb5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
name: wolf-install-krb5
path: build-dir
retention-days: 1
retention-days: 5

krb5_check:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/libssh2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
name: wolf-install-libssh2
path: build-dir
retention-days: 1
retention-days: 5

libssh2_check:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
name: wolf-install-memcached
path: build-dir
retention-days: 1
retention-days: 5

memcached_check:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
name: wolf-install-nginx
path: build-dir
retention-days: 1
retention-days: 5

nginx_check:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
name: wolf-install-openssh
path: build-dir
retention-days: 1
retention-days: 5

openssh_check:
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/openvpn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
with:
name: wolf-install-openvpn
path: build-dir
retention-days: 1
retention-days: 5

openvpn_check:
strategy:
fail-fast: false
matrix:
# List of refs to test
ref: [ master, release/2.6, v2.6.0 ]
ref: [ release/2.6, v2.6.0 ] # 'master' is currently broken
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stunnel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
name: wolf-install-stunnel
path: build-dir
retention-days: 1
retention-days: 5

stunnel_check:
strategy:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,12 @@ user_settings_asm.h
/IDE/Espressif/**/sdkconfig
/IDE/Espressif/**/sdkconfig.old

# MPLAB
/IDE/MPLABX16/wolfssl.X/dist/default/
/IDE/MPLABX16/wolfssl.X/.generated_files
/IDE/MPLABX16/wolfcrypt_test.X/dist/default/
/IDE/MPLABX16/wolfcrypt_test.X/.generated_files

# auto-created CMake backups
**/CMakeLists.txt.old

Expand Down
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USER root
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git"
ARG DEPS_UDP_PROXY="wget libevent-dev"
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump"
ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate"
ARG DEPS_TOOLS="ccache"
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} ${DEPS_UDP_PROXY} ${DEPS_TESTS} ${DEPS_TOOLS} \
Expand Down
62 changes: 62 additions & 0 deletions IDE/MPLABX16/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# wolfSSL MPLAB X Project Files for XC16

This directory contains project files for the Microchip MPLAB X IDE. These
projects have been set up to use the Microchip PIC24 Starter Kit
and the Microchip XC16 compiler.

In order to generate the necessary auto-generated MPLAB X files, make sure
to import the wolfssl.X project into your MPLAB X workspace before trying to
build the wolfCrypt test. This will correctly set up the respective project's
Makefiles.

## Included Project Files

### wolfSSL library (wolfssl.X)

This project builds a static wolfSSL library. The settings for this project are in `user_settings.h`:
```
<wolfssl_root>/IDE/MPLABX16/user_settings.h
```

After this project has been built, the compiled library will be located at:
```
<wolfssl_root>/IDE/MPLABX16/wolfssl.X/dist/default/production/wolfssl.X.a
```

### wolfCrypt Test App (wolfcrypt_test.X)

This project tests the wolfCrypt cryptography modules. It is generally a good
idea to run this first on an embedded system after compiling wolfSSL in order
to verify all underlying crypto is working correctly. This project depends on
files generated by Microchip's MCC tool to view the UART output. Follow the
steps below to generate that code.

## Generating MCC UART code

1. Open the MPLAB Code Configurator application.

2. Set the Project path to the wolfSSL/IDE/MPLABX16 and enter your PIC device
into the interface.

3. Select MCC Clasic as the content type and click `Finish`.

4. Under the Device Resources section, find the UART entry and add the UART1
peripheral.

5. Note the UART settings and check the `Enable UART Interrupts` and
`Redirect Printf to UART` boxes.

6. Click the `Generate` button.


**Note** : If using an older version of `xc16`, you may have to add the
following to `user_settings.h`.
```
#define WOLFSSL_HAVE_MIN
#define WOLFSSL_HAVE_MAX
```

## Support

Please send questions or comments to support@wolfssl.com

8 changes: 8 additions & 0 deletions IDE/MPLABX16/include.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# vim:ft=automake
# All paths should be given relative to the root
#

EXTRA_DIST += \
IDE/MPLABX16/README.md \
IDE/MPLABX16/main.c \
IDE/MPLABX16/user_settings.h
39 changes: 39 additions & 0 deletions IDE/MPLABX16/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* main.c
*
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL 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.
*
* wolfSSL 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/

#include <stdio.h>

#include <wolfssl/wolfcrypt/settings.h>
#include <wolfcrypt/test/test.h>

#include <stdlib.h>

#include "xc.h"
#include "mcc_generated_files/mcc.h"

int main(void) {
SYSTEM_Initialize();

wolfcrypt_test(NULL);

return 0;
}

Loading

0 comments on commit 46bb137

Please sign in to comment.