Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 942aed8
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Aug 6 20:54:03 2024 -0400

    chore: update changelog and mbedtls headers

commit 3b97f84
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Aug 6 19:57:10 2024 -0400

    update libsecp256k1 to v0.5.1

commit 7989a26
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Aug 6 19:42:25 2024 -0400

    update openssl to 3.3.1

commit e949ae5
Author: vnugent <public@vaughnnugent.com>
Date:   Mon Aug 5 18:01:03 2024 -0400

    fix: Find and fix openssl encryption bug

commit a60a3e1
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Aug 4 15:27:06 2024 -0400

    cleanup comments + return codes

commit 2aa7f4b
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Jul 27 22:20:53 2024 -0400

    fix codeberg url

commit 1640f79
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Jul 27 00:05:07 2024 -0400

    fix: Potential overflow in nip44 padding calculation

commit 07de078
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Jul 26 23:37:15 2024 -0400

    refactor: Span invasion, checks and fix some evp api

commit 54f520e
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Jul 23 19:55:13 2024 -0400

    latest changes

commit 12feb33
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Jul 21 17:51:04 2024 -0400

    Push latest changes, patches, and internal upgrades

commit ffe42b6
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Jul 13 22:13:13 2024 -0400

    test: Add decryption test cases and fixes

commit 5dfafbc
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Jul 12 22:14:00 2024 -0400

    feat: add decryption functionality to public api

commit 8df8c5a
Author: vnugent <public@vaughnnugent.com>
Date:   Thu Jul 11 21:39:39 2024 -0400

    feat: Update sidecar utils library

commit 23fe6e8
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Jul 5 00:03:48 2024 -0400

    push latest utils and changes

commit dc71f86
Author: vnugent <public@vaughnnugent.com>
Date:   Mon Jul 1 15:05:34 2024 -0400

    fix: #7 fix confusing inline functions

commit 9016604
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Jun 18 21:22:37 2024 -0400

    push pending changes

commit 461dd71
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Jun 11 15:44:28 2024 -0400

    feat!: #4 Close #4. Add public nip04 support to api

commit a74f962
Merge: 1c26ef8 51d0aff
Author: vnugent <public@vaughnnugent.com>
Date:   Wed May 29 13:37:00 2024 -0400

    Merge branch 'master' into develop

commit 1c26ef8
Author: vnugent <public@vaughnnugent.com>
Date:   Wed May 29 13:34:20 2024 -0400

    missed extra argument

commit 88c9095
Author: vnugent <public@vaughnnugent.com>
Date:   Wed May 29 13:25:51 2024 -0400

    refactor!: return NC_SUCCESS when validating secret key

commit 718be80
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 27 14:52:41 2024 -0400

    fix: Properly build mbedtls & cmake fixes

commit a8a6efb
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 26 17:39:40 2024 -0400

    chore: Update libs, reorder files, internalize private headers

commit 72e1b7b
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 26 13:39:08 2024 -0400

    fix: Add c++ extern prototypes in noscrypt.h

commit aeaac8d
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 26 11:47:17 2024 -0400

    refactor: Dep update, openssl chacha20 added

commit 86b0254
Author: vnugent <public@vaughnnugent.com>
Date:   Sat May 18 12:24:17 2024 -0400

    refactor: Remove NCContext structure definition

commit d09d933
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 13 22:33:50 2024 -0400

    fix: update mbedtls inline issue includes

commit 7838cb4
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 13 22:29:16 2024 -0400

    fix: force fPIC for secp256k1 targets

commit d76f770
Merge: aa8033d a526139
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 12 00:37:01 2024 -0400

    Merge branch 'master' into develop

commit aa8033d
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 12 00:34:20 2024 -0400

    Final overview and test before tag

commit 4e3ead2
Merge: 2cee801 872c49d
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 6 22:08:09 2024 -0400

    Merge branch 'master' into develop

commit 2cee801
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 6 22:02:39 2024 -0400

    Ensure static and dynamic libs get same args

commit f533694
Author: vnugent <public@vaughnnugent.com>
Date:   Mon May 6 21:50:29 2024 -0400

    feat: CMake install & fetch-content test & updates

commit 940ff20
Author: vnugent <public@vaughnnugent.com>
Date:   Sun May 5 14:07:28 2024 -0400

    codeberg readonly push

commit b34ed05
Merge: 0a40e20 e737556
Author: vnugent <public@vaughnnugent.com>
Date:   Sat May 4 14:06:45 2024 -0400

    Merge branch 'master' into develop

commit 0a40e20
Author: vnugent <public@vaughnnugent.com>
Date:   Sat May 4 13:55:19 2024 -0400

    ci: Force disable testing for win ci builds

commit 55fae18
Author: vnugent <public@vaughnnugent.com>
Date:   Thu May 2 21:54:35 2024 -0400

    feat: Working and tested openssl impl & defaults

commit 6ff8bb1
Author: vnugent <public@vaughnnugent.com>
Date:   Thu Apr 25 17:45:42 2024 -0400

    refactor: Finish support and testing for mbedtls

commit 7cb7a93
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Apr 23 18:19:31 2024 -0400

    refactor!: MbedTLS on Windows, switch to uint32

commit 30e8dda
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Apr 23 14:48:05 2024 -0400

    refactor: Crypto dep redesign working on Windows

commit d09c6c1
Author: vnugent <public@vaughnnugent.com>
Date:   Thu Apr 18 00:28:51 2024 -0400

    refactor!: Pushing what I have to dev

commit 54e06ad
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Apr 13 01:24:00 2024 -0400

    fix: convert constants to hex, inline macro, ParseErrorCode

commit 4215e31
Merge: d3328f4 7485aa5
Author: vnugent <public@vaughnnugent.com>
Date:   Wed Apr 3 18:26:30 2024 -0400

    Merge branch 'master' into develop

commit d3328f4
Author: vnugent <public@vaughnnugent.com>
Date:   Wed Apr 3 18:22:56 2024 -0400

    build: Included dependency and versions in client builds

commit b11bc0b
Author: vnugent <public@vaughnnugent.com>
Date:   Wed Apr 3 18:10:08 2024 -0400

    fix: Fix c89 compatabilty comments and struct assignment

commit 9915bd4
Merge: 8e3d6ea 5184d7d
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Mar 30 09:57:30 2024 -0400

    Merge branch 'master' into develop

commit 8e3d6ea
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Mar 30 09:52:55 2024 -0400

    refactor!: Some api (struct) changes and updated tests

commit e88e842
Merge: 490dfee 21f6c0a
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Mar 3 15:02:34 2024 -0500

    Merge branch 'master' into develop

commit 490dfee
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Mar 3 14:59:25 2024 -0500

    test: #3 tests for encryption/description and Macs

commit efa9749
Merge: 1b84e3c 120022a
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Mar 3 14:55:48 2024 -0500

    merge master

commit 1b84e3c
Author: vnugent <public@vaughnnugent.com>
Date:   Sat Mar 2 22:57:36 2024 -0500

    fix: #2 constent usage of sizeof() operator on struct types

commit 9de5a21
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Mar 1 14:30:36 2024 -0500

    perf: avoid nc_key struct copy, cast and verify instead

commit b917b76
Author: vnugent <public@vaughnnugent.com>
Date:   Mon Feb 12 22:06:50 2024 -0500

    fix: found the constant time memcompare function

commit 9f85fff
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Feb 9 22:48:35 2024 -0500

    feat: added/update MAC functions to sign or verify nip44 payload

commit aa51137
Author: vnugent <public@vaughnnugent.com>
Date:   Wed Feb 7 01:37:53 2024 -0500

    add missing hmac-key output buffer

commit 55f47d2
Author: vnugent <public@vaughnnugent.com>
Date:   Sun Feb 4 21:08:13 2024 -0500

    simple bug fixes, and public api argument validation tests

commit 73c5a71
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Feb 2 23:05:48 2024 -0500

    update api to return secpvalidate return code instead of internal return codes

commit 06c7300
Author: vnugent <public@vaughnnugent.com>
Date:   Fri Feb 2 19:25:17 2024 -0500

    change to lgpl license

commit 6e79fdb
Author: vnugent <public@vaughnnugent.com>
Date:   Wed Jan 31 21:30:49 2024 -0500

    move validation macros, and optionally disable them

commit ac1e588
Author: vnugent <public@vaughnnugent.com>
Date:   Tue Jan 30 12:25:05 2024 -0500

    couple more tests, renable range checks, set flags for all projects
  • Loading branch information
VnUgE committed Aug 7, 2024
1 parent 51d0aff commit 6fdc4bc
Show file tree
Hide file tree
Showing 45 changed files with 3,045 additions and 689 deletions.
2 changes: 1 addition & 1 deletion .onedev-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PushRepository
name: Codeberg push sync
remoteUrl: https://codeberg.com/VnUgE/noscrypt.git
remoteUrl: https://codeberg.org/VnUgE/noscrypt.git
userName: VnUgE
passwordSecret: codeberg-access-token
force: true
Expand Down
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.3-beta] - 2024-08-6

### Added
- Utilities sidecar library for easy note encryption (noscryptutil.h)
- Utilities for padding calculations
- Prints the name of the configured crypto backend during build
- Many internal hardening improvments (span pass-by-value, span validation functions)

### Fixed
- OpenSSL EVP incorrect cipher initialization vector
- OpenSSL HKDF incorrect key derivation when switching to EVP api

### Changed
- Updated libsecp256k1 to v0.5.1
- Updated OpenSSL to v3.3.1
- Converted `NCToSecKey()` and `NCToPubKey()` to a explicitly named macros
- Converted error code helper functions from header-only functions to standard api
- Added helper functions to alter the `NCEncryptionArgs` api. Altering fields directly is now deprecated.
- Public API visibility for non-Windows platforms now defaults to `extern`
- **Breaking:** Changed the `nonce32` and `hmacKeyOut32` properties of the `NCEncryptionArgs` struct to `nonceData` and `keyData` respectively. ABI is still compatible, but API has changed. Again mutating this structure manually is now deprecated.

## [0.1.2] - 2024-05-29

### Added

- `NCGetSharedContext()` to get a process-wide shared context.
- C++ extern wrappers noscrypt.h public api
- Integrated test exe to cmake ctest

### Fixed

- Potential memory leak for openssl evp contexts during error conditions.
- mbedtls dependency compilation when using fetch for release builds.
- fPIC errors for libsecp256k1.

### Changed

- Update libsecp256k1 to v0.5.0.
- **Breaking:** `NCValidateSecretKey()` retruns NC_SUCCESS instead of 1.
- Builds using OpenSSL as a crypto backend no longer require the monocypher dependency.

### Removed

- NCContext structure defintion.
- Internal headers from the public include directory.

[unreleased]: https://github.com/VnUgE/noscrypt/compare/v0.1.3-beta...HEAD
[0.1.3-beta]: https://github.com/VnUgE/noscrypt/compare/v0.1.2...v0.1.3-beta
[0.1.2]: https://github.com/VnUgE/noscrypt/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/VnUgE/noscrypt/compare/v0.1.0...v0.1.1
45 changes: 31 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ project(
set(_NC_PROJ_NAME "noscrypt")

option(NC_BUILD_TESTS "Build tests" OFF)
option(NC_ENABLE_UTILS "Enables the sidecar utility library" OFF)
option(NC_DISABLE_INPUT_VALIDATION "Disables public function input validation" OFF)
option(NC_FETCH_MBEDTLS "Fetch Mbed-TLS from it's source repository locally" OFF)
option(NC_FETCH_SECP256K1 "Fetch and locally build secp256k1 source code" ON)
Expand Down Expand Up @@ -50,7 +51,7 @@ if(NC_FETCH_SECP256K1)
FetchContent_Declare(
libsecp256k1
GIT_REPOSITORY https://github.com/bitcoin-core/secp256k1
GIT_TAG e3a885d42a7800c1ccebad94ad1e2b82c4df5c65 # release-0.5.0
GIT_TAG 642c885b6102725e25623738529895a95addc4f4 # release-0.5.1
GIT_PROGRESS TRUE
)

Expand Down Expand Up @@ -94,6 +95,17 @@ set(NOSCRYPT_HEADERS
"src/nc-crypto.h"
)

#if utils are enabled, add the source files
if(NC_ENABLE_UTILS)
list(APPEND NOSCRYPT_SRCS "src/noscryptutil.c")
list(APPEND NOSCRYPT_HEADERS "include/noscryptutil.h")

#notify the project that utils are enabled
list(APPEND NC_PROJ_DEFINTIONS NC_ENABLE_UTILS)

message(STATUS "Utilities libraries are enabled")
endif()

#static/shared library
add_library(${_NC_PROJ_NAME} SHARED ${NOSCRYPT_SRCS} ${NOSCRYPT_HEADERS})
add_library(${_NC_PROJ_NAME}_static STATIC ${NOSCRYPT_SRCS} ${NOSCRYPT_HEADERS})
Expand Down Expand Up @@ -131,19 +143,6 @@ target_include_directories(${_NC_PROJ_NAME}_static SYSTEM PUBLIC vendor/secp256k
#
#############################################

#try to load openssl quietly in order to check for its availability
find_package(OpenSSL QUIET)

#setup default linking to crypto libraries for certain plaftorms.
#Windows defaults to bcrypt, openssl otherwise if installed
if(CRYPTO_LIB STREQUAL "")
if(MSVC)
set(CRYPTO_LIB "bcrypt")
elseif(OPENSSL_FOUND)
set(CRYPTO_LIB "openssl")
endif()
endif()

#Include mbedtls if enabled
if(NC_FETCH_MBEDTLS)

Expand Down Expand Up @@ -172,6 +171,22 @@ if(NC_FETCH_MBEDTLS)

endif()

#try to load openssl quietly in order to check for its availability
find_package(OpenSSL QUIET)

#setup default linking to crypto libraries for certain plaftorms.
#Windows defaults to bcrypt, openssl otherwise if installed
if(CRYPTO_LIB STREQUAL "")
if(MSVC)
set(CRYPTO_LIB "bcrypt")
elseif(OPENSSL_FOUND)
set(CRYPTO_LIB "openssl")
endif()

message(STATUS "No crypto library was specified, defaulting to ${CRYPTO_LIB}")
endif()


#if mbedtls linking is enabled target the library
if(CRYPTO_LIB STREQUAL "mbedtls")

Expand Down Expand Up @@ -364,11 +379,13 @@ if(NC_BUILD_TESTS)
#add test executable and link to shared library for more realistic usage
add_executable(nctest tests/test.c)
target_link_libraries(nctest ${_NC_PROJ_NAME})

target_include_directories(nctest PRIVATE include)
target_include_directories(nctest PRIVATE src) #allow access to internal headers

#enable c11 for testing
target_compile_features(nctest PRIVATE c_std_11)
target_compile_definitions(nctest PRIVATE ${NC_PROJ_DEFINTIONS})

enable_testing()

Expand Down
43 changes: 14 additions & 29 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
},
{
"name": "x64-debug",
Expand All @@ -27,7 +27,8 @@
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"NC_BUILD_TESTS": true
"NC_BUILD_TESTS": true,
"NC_ENABLE_UTILS": true
}
},
{
Expand All @@ -44,34 +45,18 @@
"CRYPTO_LIB": "openssl"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"NC_BUILD_TESTS": true
}
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "x86-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"NC_ENABLE_UTILS": true
}
}
]
}
6 changes: 6 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
branches: {}
ignore:
sha: []
merge-message-formats: {}
4 changes: 4 additions & 0 deletions Module.Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ tasks:
- git reset --hard
- git remote update
- git pull origin {{.BRANCH_NAME}} --verify-signatures

#updates the project versions for all inlcuded .NET projects
- dotnet-gitversion.exe /updateprojectfiles


#called by build pipeline to build module
build:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following table lists the supported platforms and cryptography libraries tha
GitHub is simply a mirror for my projects. Extended documentation, pre-compiled binaries and source code bundles are always available on my website, along with PGP signatures and checksums.

- **[Documentation](https://www.vaughnnugent.com/resources/software/articles?tags=docs,_noscrypt)**
- **[Signed builds and sourcecode ](https://www.vaughnnugent.com/resources/software/modules/noscrypt)**
- **[Signed builds and source code](https://www.vaughnnugent.com/resources/software/modules/noscrypt)**

### Getting the package
There are 3 ways to get the source code to build this project.
Expand Down
73 changes: 58 additions & 15 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ version: '3'

vars:
CMAKE_BUILD_DIR: 'build/{{ OS }}'
TEST_EXE_NAME: 'nctest'

tasks:

Expand All @@ -29,21 +30,44 @@ tasks:
- task: build-internal
vars: { CMAKE_TEST_STATUS: 'ON', BUILD_CONFIG: 'Debug' }

build-internal:
internal: true
cmds:
- cmake -S . -B{{.CMAKE_BUILD_DIR}} -DCMAKE_BUILD_TYPE={{.BUILD_CONFIG}} -DNC_BUILD_TESTS={{ .CMAKE_TEST_STATUS }} {{.CLI_ARGS}}
- cmake --build {{.CMAKE_BUILD_DIR}} --config {{.BUILD_CONFIG}}
- cmd: echo "Build complete. Your files can be found in the {{.CMAKE_BUILD_DIR}} directory"
silent: true

#available to users and vnbuild runner
test:
desc: "Builds a local copy of the library in a debug configuration, then runs the test executable"
cmds:
- task: build-debug
- cmd: cd {{.CMAKE_BUILD_DIR}} && ctest -C Debug --verbose

test-mbedtls:
desc: "Builds and runs tests for noscrypt using the mbedtls crypto library for the current platform"
cmds:
- task: build-internal
vars:
CMAKE_TEST_STATUS: 'ON'
BUILD_CONFIG: 'Debug'
CLI_ARGS: '-DNC_FETCH_MBEDTLS=ON {{.CLI_ARGS}}' #fetches and enabled medtls
- cmd: cd {{.CMAKE_BUILD_DIR}} && ctest -C Debug --verbose

test-dev:
desc: "Re-runs compilation phase and test execution"
cmds:
- task: compile
vars: { BUILD_CONFIG: 'Debug' }
- cmd: cd {{.CMAKE_BUILD_DIR}} && ctest -C Debug --verbose --output-on-failure

compile:
internal: true
cmds:
- cmake --build {{.CMAKE_BUILD_DIR}} --config {{.BUILD_CONFIG}}

build-internal:
internal: true
cmds:
- cmake -S . -B{{.CMAKE_BUILD_DIR}} -DCMAKE_BUILD_TYPE={{.BUILD_CONFIG}} -DNC_BUILD_TESTS={{ .CMAKE_TEST_STATUS }} {{.CLI_ARGS}}
- task: compile
vars: { BUILD_CONFIG: '{{.BUILD_CONFIG}}' }
- cmd: echo "Build complete. Your files can be found in the {{.CMAKE_BUILD_DIR}} directory"
silent: true

install:
desc: "Uses cmake to install the library on your system"
cmds:
Expand Down Expand Up @@ -115,17 +139,35 @@ tasks:
desc: "Packs up the project source code and creates a tarball in the builds binary directory"
vars:
TARGET_SOURCE: '{{.PROJECT_DIR}}/{{.BINARY_DIR}}/{{.PROJECT_NAME}}-src.tgz'
SOURCE_FILES: 'CMakeLists.txt src include license tests vendor readme.md Taskfile.yaml'
SOURCE_FILES:
CMakeLists.txt
Taskfile.yaml
src
include
license
tests
vendor
readme.md
CMakePresets.json

cmds:
#tar up the source
- tar -czf "{{.TARGET_SOURCE}}" {{.SOURCE_FILES}}
- tar -czf "{{.TARGET_SOURCE}}" {{ .SOURCE_FILES | join " " }}

#################################
#
# DEV TASKS
#
#################################

dev-gdb-test:
platforms: [ linux ]
desc: "Starts a new gdb session on the test executable"
interactive: true
cmds:
- task: compile
vars: { BUILD_CONFIG: 'Debug' }
- cmd: gdb '{{.CMAKE_BUILD_DIR}}/{{.TEST_EXE_NAME}}'

dev-update-deps:
desc: "Updates vendored projects files (headers mostly) from their source repositories to the latest version"
Expand All @@ -134,6 +176,7 @@ tasks:
- task: dev-update-monocypher
- task: dev-update-mbedtls-headers
- task: dev-update-openssl-headers
- task: dev-set-secp256-headers

dev-update-monocypher:
vars:
Expand Down Expand Up @@ -162,13 +205,13 @@ tasks:

- git clone --branch {{ .MBEDTLS_GIT_BRANCH }} {{ .MBEDTLS_GIT_URL }} '{{ .TMP_DIR }}'

- for: [ 'include/mbedtls', 'include/psa' ]
- for: [ 'include/mbedtls' ]
cmd: powershell cp -Recurse -Force '{{ .TMP_DIR }}/{{ .ITEM }}' '{{.MBEDTLS_DIR}}/include'

dev-update-openssl-headers:
vars:
OPENSSL_GIT_URL: 'git://git.openssl.org/openssl.git'
OPENSSL_GIT_BRANCH: 'master'
OPENSSL_GIT_URL: 'https://github.com/openssl/openssl'
OPENSSL_GIT_BRANCH: 'openssl-3.3.1'
OPENSSL_DIR: 'vendor/openssl'
TMP_DIR: '.update/openssl'
cmds:
Expand All @@ -183,9 +226,9 @@ tasks:
dev-set-secp256-headers:
vars:
SECP256_GIT_URL: 'https://github.com/bitcoin-core/secp256k1'
SECP256_GIT_BRANCH: 'v0.5.0'
SECP256_GIT_BRANCH: 'v0.5.1'
SECP256_DIR: 'vendor/secp256k1'
TMP_DIR: '.update/openssl'
TMP_DIR: '.update/secp256k1'
cmds:
- cmd: powershell mkdir '{{.TMP_DIR}}' -Force
ignore_error: true
Expand Down
Loading

0 comments on commit 6fdc4bc

Please sign in to comment.