Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9063d2e
WIP
murillo128 Nov 5, 2020
95b0e97
replace memmove by for loop
murillo128 Nov 5, 2020
62bf7a8
cryptex in aead
murillo128 Nov 5, 2020
4939886
fix csrcs type
murillo128 Nov 5, 2020
e16a815
cyrptex -> cryptex
murillo128 Nov 6, 2020
664da14
fix test/srtp_driver structs
murillo128 Nov 9, 2020
6fa8d3b
Merge branch 'cryptex' of https://github.com/murillo128/libsrtp into …
murillo128 Nov 9, 2020
3fe608b
clang-format
murillo128 Nov 10, 2020
696ae82
remove tabs
murillo128 Nov 11, 2020
4ab5255
[wip]
murillo128 Nov 15, 2020
ce58dd6
Fix AAD and add tests
murillo128 Nov 16, 2020
6536373
format
murillo128 Nov 16, 2020
fbf23e2
clang
murillo128 Nov 16, 2020
f09a939
Merge pull request #1 from murillo128/master
murillo128 Aug 24, 2021
3f21c3e
fix warnings
murillo128 Aug 24, 2021
5124a97
rename policy.ekt to policy.deprecated_ekt to aling with master
murillo128 Aug 24, 2021
f8a374b
fix format
murillo128 Aug 29, 2021
90d2345
fix mem leak on deallocating recv sessions
murillo128 Aug 29, 2021
f1ab8cc
Merge branch murillo128:cryptex
pabuhler Sep 6, 2024
7e43bc5
enable cryptex support
pabuhler Nov 9, 2024
7ed0ea9
Merge 'origin/main'
pabuhler Dec 17, 2024
6351696
add cipher test that verifies multiple packets
pabuhler Jan 14, 2025
eeb02e9
call wc_AesSetKey between each encryption operation
pabuhler Jan 14, 2025
a06b7ed
[code] fix size_t to int cast to comply to openssl signature EVP_Decr…
Jan 21, 2025
3b9af4b
[code] fix clang reformat
Jan 21, 2025
9a0c37a
Merge pull request #740 from pabuhler/wolfssl-icm-multi-encrypt
pabuhler Jan 28, 2025
b84eb57
Merge pull request #742 from pbodilis/main
pabuhler Jan 28, 2025
0428aa2
Don't require OpenSSL version number as BoringSSL doesn't define it
kmansoft Feb 11, 2025
4f10f41
update upload-artifact version in cifuzz task
pabuhler Feb 11, 2025
12ca078
Merge pull request #749 from pabuhler/cifuzz-fix
pabuhler Feb 11, 2025
cb9e892
Merge pull request #745 from kmansoft/main-kostya
pabuhler Feb 14, 2025
de8b1b8
remove openssl version check
pabuhler Feb 14, 2025
8821982
add test for cryptex with no hdr xtn
pabuhler Feb 17, 2025
def2d64
Merge pull request #750 from pabuhler/remove-openssl-version-check
pabuhler Feb 17, 2025
e26fe06
use memmove() instead of for loop
pabuhler Feb 19, 2025
76f23aa
Merge pull request #511 from murillo128/cryptex
pabuhler Mar 10, 2025
23d70f3
Properly support null crypto and null auth scenario
freemangordon May 30, 2025
1a1db44
use size_t and fix comment
pabuhler Jun 23, 2025
066243a
Merge pull request #757 from freemangordon/null_crypto_null_auth
pabuhler Jun 25, 2025
5b3752c
Update autotools.yml
pabuhler Aug 9, 2025
626eed9
Change crypto config for cmake
pabuhler Aug 10, 2025
fe6b043
Change crypto config for autotools
pabuhler Aug 10, 2025
dce43ff
Merge pull request #762 from pabuhler/crypto_config
pabuhler Aug 13, 2025
50d8062
ignore all build* folders
pabuhler Aug 14, 2025
5c64b16
Change to use OpenSSL as default crypto library
pabuhler Aug 25, 2025
d96358e
Merge pull request #764 from pabuhler/openssl-default
pabuhler Aug 27, 2025
9035389
add failing AES 192 validation test
pabuhler Aug 27, 2025
6ad7749
set kdf_key_len to correct value
pabuhler Aug 28, 2025
8016607
Merge pull request #765 from pabuhler/fix-aes-192-kdf
pabuhler Oct 2, 2025
45bc1ca
Do not explicitly check for runtime dependencies when building
pabuhler Oct 2, 2025
b58d596
Merge pull request #771 from pabuhler/remove-zlib
pabuhler Oct 2, 2025
d1066eb
add cmake release ci
pabuhler Oct 9, 2025
781e33e
tesy
pabuhler Oct 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a
run: cmake $GITHUB_WORKSPACE -DCRYPTO_LIBRARY=internal -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a

- name: Build
working-directory: ${{github.workspace}}/build
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Configure CMake (Shared Library)
working-directory: ${{github.workspace}}/build_shared
shell: bash
run: cmake $GITHUB_WORKSPACE -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a
run: cmake $GITHUB_WORKSPACE -DCRYPTO_LIBRARY=internal -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a

- name: Build (Shared Library)
working-directory: ${{github.workspace}}/build_shared
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: AutoTools CI

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
Expand All @@ -15,13 +16,13 @@ jobs:
crypto: [internal, openssl, wolfssl, nss]
include:
- crypto: internal
configure-crypto-enable: ""
configure-crypto-enable: "--with-crypto-library=internal"
- crypto: openssl
configure-crypto-enable: "--enable-openssl"
configure-crypto-enable: "--with-crypto-library=openssl"
- crypto: wolfssl
configure-crypto-enable: "--enable-wolfssl"
configure-crypto-enable: "--with-crypto-library=wolfssl"
- crypto: nss
configure-crypto-enable: "--enable-nss"
configure-crypto-enable: "--with-crypto-library=nss"

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fuzz-seconds: 300
language: c++
- name: Upload Crash
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ jobs:
crypto: openssl3
include:
- crypto: internal
cmake-crypto-enable: ""
cmake-crypto-enable: "-DCRYPTO_LIBRARY=internal"
- crypto: openssl
cmake-crypto-enable: "-DENABLE_OPENSSL=ON"
cmake-crypto-enable: "-DCRYPTO_LIBRARY=openssl"
- crypto: openssl3
cmake-crypto-enable: "-DENABLE_OPENSSL=ON"
cmake-crypto-enable: "-DCRYPTO_LIBRARY=openssl"
- crypto: wolfssl
cmake-crypto-enable: "-DENABLE_WOLFSSL=ON"
cmake-crypto-enable: "-DCRYPTO_LIBRARY=wolfssl"
- crypto: nss
cmake-crypto-enable: "-DENABLE_NSS=ON"
cmake-crypto-enable: "-DCRYPTO_LIBRARY=nss"
- crypto: mbedtls
cmake-crypto-enable: "-DENABLE_MBEDTLS=ON"
cmake-crypto-enable: "-DCRYPTO_LIBRARY=mbedtls"

runs-on: ${{ matrix.os }}

Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/cmake_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CMake Release CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '20 4 * * 1'

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
lib_type: [static, shared]
include:
- lib_type: static
cmake-lib-type: "-DBUILD_SHARED_LIBS=Off"
- lib_type: shared
cmake-lib-type: "-DBUILD_SHARED_LIBS=On"

runs-on: ${{ matrix.os }}

env:
CTEST_OUTPUT_ON_FAILURE: 1

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DLIBSRTP_TEST_APPS=OFF ${{matrix.cmake-lib-type}}

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config Release

- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --install . --prefix ${{github.workspace}}/install --config Release
9 changes: 2 additions & 7 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
crypto: openssl3
include:
- crypto: internal
meson-crypto-enable: ""
meson-crypto-enable: "-Dcrypto-library=internal"
- crypto: openssl
meson-crypto-enable: "-Dcrypto-library=openssl"
- crypto: openssl3
Expand Down Expand Up @@ -126,12 +126,7 @@ jobs:
- uses: actions/checkout@v2

- name: Create Build Environment
run: meson setup ${{github.workspace}}/build

- name: Configure Meson
working-directory: ${{github.workspace}}/build
shell: bash
run: ${{ env.pkgconfig-crypto-dir }} meson configure ${{ matrix.meson-crypto-enable }}
run: meson setup ${{github.workspace}}/build ${{ matrix.meson-crypto-enable }}

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stream_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Configure CMake
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -DLIBSRTP_TEST_APPS=ON -DCMAKE_C_FLAGS:STRING="-DSRTP_NO_STREAM_LIST -DSRTP_USE_TEST_STREAM_LIST"
run: cmake $GITHUB_WORKSPACE -DCRYPTO_LIBRARY=internal -DLIBSRTP_TEST_APPS=ON -DCMAKE_C_FLAGS:STRING="-DSRTP_NO_STREAM_LIST -DSRTP_USE_TEST_STREAM_LIST"

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ old?
*.app

# srtp things
build
build*/
Debug
Makefile
Root
Expand Down
57 changes: 25 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,49 +85,42 @@ endif()
set(ENABLE_DEBUG_LOGGING OFF CACHE BOOL "Enable debug logging in all modules")
set(ERR_REPORTING_STDOUT OFF CACHE BOOL "Enable logging to stdout")
set(ERR_REPORTING_FILE "" CACHE FILEPATH "Use file for logging")
set(ENABLE_OPENSSL OFF CACHE BOOL "Enable OpenSSL crypto engine")
set(ENABLE_WOLFSSL OFF CACHE BOOL "Enable wolfSSL crypto engine")
set(ENABLE_MBEDTLS OFF CACHE BOOL "Enable MbedTLS crypto engine")
set(ENABLE_NSS OFF CACHE BOOL "Enable NSS crypto engine")

if(ENABLE_OPENSSL OR ENABLE_WOLFSSL OR ENABLE_MBEDTLS OR ENABLE_NSS)
set(USE_EXTERNAL_CRYPTO TRUE)
else()
set(USE_EXTERNAL_CRYPTO FALSE)
set(CRYPTO_LIBRARY_VALUES "openssl;wolfssl;mbedtls;nss;internal")
set(CRYPTO_LIBRARY "openssl" CACHE STRING
"Crypto library used by libSRTP, can be one of: ${CRYPTO_LIBRARY_VALUES}")
set_property(CACHE CRYPTO_LIBRARY PROPERTY STRINGS ${CRYPTO_LIBRARY_VALUES})
if(NOT CRYPTO_LIBRARY IN_LIST CRYPTO_LIBRARY_VALUES)
message(FATAL_ERROR "Invalid value for CRYPTO_LIBRARY: ${CRYPTO_LIBRARY}. Allowed values are: ${CRYPTO_LIBRARY_VALUES}")
endif()
message(STATUS "Using crypto library: ${CRYPTO_LIBRARY}")

if(ENABLE_OPENSSL)
if(ENABLE_WOLFSSL OR ENABLE_NSS OR ENABLE_MBEDTLS)
message(FATAL_ERROR "ssl conflict. can not enable openssl and wolfssl, mbedtls or nss simultaneously.")
endif()
find_package(OpenSSL 1.1.0 REQUIRED)
set(USE_EXTERNAL_CRYPTO TRUE)
set(ENABLE_OPENSSL FALSE)
set(ENABLE_WOLFSSL FALSE)
set(ENABLE_MBEDTLS FALSE)
set(ENABLE_NSS FALSE)

if(CRYPTO_LIBRARY STREQUAL "internal")
set(USE_EXTERNAL_CRYPTO FALSE)
elseif(CRYPTO_LIBRARY STREQUAL "openssl")
set(ENABLE_OPENSSL TRUE)
find_package(OpenSSL REQUIRED)
set(OPENSSL ${ENABLE_OPENSSL} CACHE BOOL INTERNAL)
set(GCM ${ENABLE_OPENSSL} CACHE BOOL INTERNAL)
endif()

if(ENABLE_WOLFSSL)
if(ENABLE_OPENSSL OR ENABLE_NSS OR ENABLE_MBEDTLS)
message(FATAL_ERROR "ssl conflict. can not enable wolfssl and openssl, mbedtls or nss simultaneously.")
endif()
elseif(CRYPTO_LIBRARY STREQUAL "wolfssl")
set(ENABLE_WOLFSSL TRUE)
find_package(wolfSSL REQUIRED)
set(WOLFSSL ${ENABLE_WOLFSSL} CACHE BOOL INTERNAL)
set(WOLFSSL_KDF ${ENABLE_WOLFSSL} CACHE BOOL INTERNAL)
set(GCM ${ENABLE_WOLFSSL} CACHE BOOL INTERNAL)
endif()

if(ENABLE_MBEDTLS)
if(ENABLE_OPENSSL OR ENABLE_WOLFSSL OR ENABLE_NSS)
message(FATAL_ERROR "ssl conflict. can not enable mbedtls and openssl, wolfssl or nss simultaneously.")
endif()
elseif(CRYPTO_LIBRARY STREQUAL "mbedtls")
set(ENABLE_MBEDTLS TRUE)
find_package(MbedTLS REQUIRED)
set(MBEDTLS ${ENABLE_MBEDTLS} CACHE BOOL INTERNAL)
set(GCM ${ENABLE_MBEDTLS} CACHE BOOL INTERNAL)
endif()

if(ENABLE_NSS)
if(ENABLE_OPENSSL OR ENABLE_WOLFSSL OR ENABLE_MBEDTLS)
message(FATAL_ERROR "ssl conflict. can not enable nss and openssl, wolfssl or mbedtls simultaneously.")
endif()
elseif(CRYPTO_LIBRARY STREQUAL "nss")
set(ENABLE_NSS TRUE)
find_package(NSS REQUIRED)
set(NSS ${ENABLE_NSS} CACHE BOOL INTERNAL)
set(GCM ${ENABLE_NSS} CACHE BOOL INTERNAL)
Expand Down Expand Up @@ -324,7 +317,7 @@ if(WIN32)
target_compile_definitions(srtp3 PUBLIC _CRT_SECURE_NO_WARNINGS)
endif()

install(TARGETS srtp3 DESTINATION lib
install(TARGETS srtp3
EXPORT libSRTPTargets
)

Expand Down
6 changes: 0 additions & 6 deletions config_in.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL

/* Define to 1 if you have the `nspr4' library (-lnspr4). */
#undef HAVE_LIBNSPR4

Expand All @@ -57,9 +54,6 @@
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET

/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ

/* Define to 1 if you have the <machine/types.h> header file. */
#undef HAVE_MACHINE_TYPES_H

Expand Down
Loading
Loading