Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b6daa99
Add allocators/deallocators for OcspRequest and OcspResponse
julek-wolfssl Jan 8, 2026
47054fd
Add ocsp-responder option
julek-wolfssl Jan 8, 2026
7098f1f
Add test_ocsp_responder
julek-wolfssl Jan 9, 2026
1600a80
DecodedCert: add subject, issuer, and serial accessors
julek-wolfssl Jan 9, 2026
7bda43c
fixup! Add allocators/deallocators for OcspRequest and OcspResponse
julek-wolfssl Jan 9, 2026
ded4a68
fixup! DecodedCert: add subject, issuer, and serial accessors
julek-wolfssl Jan 9, 2026
d2671c3
GetASN_Items: correct bounds check on endIdx
julek-wolfssl Jan 12, 2026
a4c5ee7
Implement DecodeOcspRequest
julek-wolfssl Jan 12, 2026
afa5d00
Move MakeSignature
julek-wolfssl Jan 16, 2026
d7f2987
Implement encoding OCSP response
julek-wolfssl Jan 16, 2026
5349a9e
Add ocsp responder scenarios
julek-wolfssl Jan 16, 2026
68d321d
fixup! Add allocators/deallocators for OcspRequest and OcspResponse
julek-wolfssl Jan 16, 2026
3d44cf4
Init ocsp responder API
julek-wolfssl Jan 16, 2026
a8c7f12
Add revocation support
julek-wolfssl Jan 16, 2026
0ece124
Add unknown support
julek-wolfssl Jan 16, 2026
dfa5264
Remove client configs
julek-wolfssl Jan 16, 2026
0ee7763
ocsp responder: support variable sig size
julek-wolfssl Jan 16, 2026
b0aafe2
Allocate ocsp responder size dynamically
julek-wolfssl Jan 17, 2026
5cb4d50
clean up keys
julek-wolfssl Jan 17, 2026
46b7831
Optimize OcspResponderCa
julek-wolfssl Jan 17, 2026
55bbfc0
Refactor ocsp responder
julek-wolfssl Jan 17, 2026
24c9bad
refactor OcspResponse_WriteResponse
julek-wolfssl Jan 17, 2026
bc0c3c4
Refactor wc_OcspResponder_WriteResponse
julek-wolfssl Jan 17, 2026
f5ed890
Add nextUpdate support
julek-wolfssl Jan 17, 2026
4a51957
Add certs in response support
julek-wolfssl Jan 17, 2026
891c302
document OCSPRESPDATAASN_IDX_RESPEXT usage
julek-wolfssl Jan 17, 2026
f57e1d7
ocsp response: add crit checking
julek-wolfssl Jan 17, 2026
d726bf7
ocsp response: add nonce extension support
julek-wolfssl Jan 23, 2026
d5b74e2
Add missing features list.
julek-wolfssl Jan 23, 2026
5c159c0
Add ocsp responder example
julek-wolfssl Feb 10, 2026
b6e5a28
Add responder interop
julek-wolfssl Feb 10, 2026
9a60bf1
Add responder to enable-all
julek-wolfssl Feb 10, 2026
72f4fea
Fix sending certs with CA exts
julek-wolfssl Feb 10, 2026
36b0d8e
CI fixes
julek-wolfssl Feb 10, 2026
ccce5a8
Fix clang-tidy errors
julek-wolfssl Feb 11, 2026
facdce0
Better script logging
julek-wolfssl Feb 11, 2026
c3837c4
Clean clang tidy
julek-wolfssl Feb 11, 2026
53ba84d
Remove header circular dependency
julek-wolfssl Feb 11, 2026
205d7ae
Fix memory logging
julek-wolfssl Feb 11, 2026
2e1ea00
Clean up responder on signal
julek-wolfssl Feb 11, 2026
000cccf
Clean up leak in server
julek-wolfssl Feb 11, 2026
e692eec
Add responder to wolfclu options
julek-wolfssl Feb 11, 2026
a129c54
Detect stapling support
julek-wolfssl Feb 11, 2026
bef9e8f
fixup! Clean up leak in server
julek-wolfssl Feb 11, 2026
e881b7c
Fix memory errors
julek-wolfssl Feb 11, 2026
23e515d
Signals should be returned by syscalls to be able to exit loop
julek-wolfssl Feb 12, 2026
ab11a73
Better logging
julek-wolfssl Feb 12, 2026
76fd541
Use ready files for syncing
julek-wolfssl Feb 12, 2026
fbd8b35
Fix Ci
julek-wolfssl Feb 12, 2026
a177232
add hash todo
julek-wolfssl Feb 13, 2026
f7d537e
Revert makesignature after rebase
julek-wolfssl Feb 16, 2026
bf691b7
ocsp support other hash algos
julek-wolfssl Feb 16, 2026
3386dce
Add key type check
julek-wolfssl Feb 18, 2026
8bbec1e
Implement authorized responder
julek-wolfssl Feb 18, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/os-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
'--enable-all CPPFLAGS=''-DNO_WOLFSSL_SERVER -DWOLFSSL_NO_CLIENT_AUTH''',
'--enable-curve25519=nonblock --enable-ecc=nonblock --enable-sp=yes,nonblock CPPFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_DEBUG_NONBLOCK"',
'--enable-certreq --enable-certext --enable-certgen --disable-secure-renegotiation-info CPPFLAGS="-DNO_TLS"',
'--enable-ocsp --enable-ocsp-responder',
]
name: make check
if: github.repository_owner == 'wolfssl'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ examples/sctp/sctp-client
examples/sctp/sctp-client-dtls
examples/asn1/asn1
examples/pem/pem
examples/ocsp_responder/ocsp_responder
server_ready
snifftest
output
Expand Down
Binary file added certs/ocsp/intermediate1-ca-cert.der
Binary file not shown.
Binary file added certs/ocsp/intermediate1-ca-key.der
Binary file not shown.
Binary file added certs/ocsp/intermediate2-ca-cert.der
Binary file not shown.
Binary file added certs/ocsp/intermediate2-ca-key.der
Binary file not shown.
Binary file added certs/ocsp/intermediate3-ca-cert.der
Binary file not shown.
Binary file added certs/ocsp/intermediate3-ca-key.der
Binary file not shown.
Binary file added certs/ocsp/ocsp-responder-cert.der
Binary file not shown.
Binary file added certs/ocsp/ocsp-responder-key.der
Binary file not shown.
11 changes: 11 additions & 0 deletions certs/ocsp/renewcerts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ openssl x509 -in root-ca-cert.pem -text > tmp.pem
check_result $? ""
mv tmp.pem root-ca-cert.pem

echo "OCSP renew certs Step 4"
openssl x509 -in root-ca-cert.pem -outform DER -out root-ca-cert.der
check_result $? ""
openssl rsa -in root-ca-key.pem -outform DER -out root-ca-key.der
check_result $? ""

# $1 cert, $2 name, $3 ca, $4 extensions, $5 serial
update_cert() {
echo "Updating certificate \"$1-cert.pem\""
Expand Down Expand Up @@ -75,6 +81,11 @@ update_cert() {
check_result $? "Step 3"
mv "$1"_tmp.pem "$1"-cert.pem
cat "$3"-cert.pem >> "$1"-cert.pem

openssl x509 -in "$1"-cert.pem -outform DER -out "$1"-cert.der
check_result $? "Step 4"
openssl rsa -in "$1"-key.pem -outform DER -out "$1"-key.der
check_result $? "Step 5"
}

update_cert intermediate1-ca "wolfSSL intermediate CA 1" root-ca v3_ca 01
Expand Down
Binary file added certs/ocsp/root-ca-cert.der
Binary file not shown.
Binary file added certs/ocsp/root-ca-key.der
Binary file not shown.
Binary file added certs/ocsp/server1-cert.der
Binary file not shown.
Binary file added certs/ocsp/server1-key.der
Binary file not shown.
Binary file added certs/ocsp/server2-cert.der
Binary file not shown.
Binary file added certs/ocsp/server2-key.der
Binary file not shown.
Binary file added certs/ocsp/server3-cert.der
Binary file not shown.
Binary file added certs/ocsp/server3-key.der
Binary file not shown.
Binary file added certs/ocsp/server4-cert.der
Binary file not shown.
Binary file added certs/ocsp/server4-key.der
Binary file not shown.
Binary file added certs/ocsp/server5-cert.der
Binary file not shown.
Binary file added certs/ocsp/server5-key.der
Binary file not shown.
55 changes: 42 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1045,21 +1045,26 @@ do
# Enable all ASN features
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASN_ALL"
ENABLED_ASN=yes
ASN_IMPL=template
;;
template | yes)
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASN_TEMPLATE"
ENABLED_ASN=yes
ASN_IMPL=template
;;
original)
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ASN_ORIGINAL"
ASN_IMPL=original
;;
nocrypt)
AM_CFLAGS="$AM_CFLAGS -DNO_ASN_CRYPT"
enable_pwdbased=no
ASN_IMPL=template
;;
no)
AM_CFLAGS="$AM_CFLAGS -DNO_ASN -DNO_ASN_CRYPT"
enable_pwdbased=no
ASN_IMPL=no
;;
*)
AC_MSG_ERROR([Invalid asn option. Valid are: all, template/yes, original, nocrypt or no. Seen: $ENABLED_ASN.])
Expand Down Expand Up @@ -1457,6 +1462,7 @@ then
test "$enable_ocsp" = "" && enable_ocsp=yes
test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes
test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes
test "$enable_ocsp_responder" = "" && test "$ASN_IMPL" = "template" && enable_ocsp_responder=yes
test "$enable_crl" = "" && enable_crl=yes
test "$enable_supportedcurves" = "" && enable_supportedcurves=yes
test "$enable_tlsx" = "" && enable_tlsx=yes
Expand Down Expand Up @@ -6980,19 +6986,6 @@ AC_ARG_ENABLE([ocsp],
[ ENABLED_OCSP=no ]
)

if test "$ENABLED_OCSP" = "yes"
then
# check openssl command tool for testing ocsp
AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no])

if test "$HAVE_OPENSSL_CMD" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD"
else
AC_MSG_WARN([openssl command line tool not available for testing ocsp])
fi
fi


# Certificate Status Request : a.k.a. OCSP Stapling
AC_ARG_ENABLE([ocspstapling],
Expand Down Expand Up @@ -7061,6 +7054,18 @@ then
fi


AC_ARG_ENABLE([ocsp-responder],
[AS_HELP_STRING([--enable-ocsp-responder],[Enable OCSP Responder (default: disabled)])],
[ ENABLED_OCSP_RESPONDER=$enableval ],
[ ENABLED_OCSP_RESPONDER=no ]
)

if test "x$ENABLED_OCSP_RESPONDER" = "xyes"
then
ENABLED_OCSP="yes"
ENABLED_CERTGEN="yes"
fi

# CRL
AC_ARG_ENABLE([crl],
[AS_HELP_STRING([--enable-crl],[Enable CRL (Use =io for inline CRL HTTP GET) (default: disabled)])],
Expand Down Expand Up @@ -10338,6 +10343,13 @@ then

AM_CFLAGS="$AM_CFLAGS -DHAVE_OID_ENCODING -DWOLFSSL_NO_ASN_STRICT"

# OCSP responder
if test "$ENABLED_OCSP" = "no"; then
ENABLED_OCSP="yes"
fi
if test "$ENABLED_OCSP_RESPONDER" = "no"; then
ENABLED_OCSP_RESPONDER="yes"
fi
fi

if test "$ENABLED_STRONGSWAN" = "yes"; then
Expand Down Expand Up @@ -10592,6 +10604,22 @@ AS_IF([test "x$ENABLED_CERTEXT" = "xyes"],
AS_IF([test "x$ENABLED_OCSP" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"])

AS_IF([test "x$ENABLED_OCSP_RESPONDER" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP_RESPONDER"])

if test "$ENABLED_OCSP" = "yes"
then
# check openssl command tool for testing ocsp
AC_CHECK_PROG([HAVE_OPENSSL_CMD],[openssl],[yes],[no])

if test "$HAVE_OPENSSL_CMD" = "yes"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_OPENSSL_CMD"
else
AC_MSG_WARN([openssl command line tool not available for testing ocsp])
fi
fi

AS_IF([test "x$ENABLED_STRONGSWAN" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LOG_PRINTF -DWOLFSSL_PUBLIC_MP -DHAVE_EX_DATA"
AS_IF([test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 2],
Expand Down Expand Up @@ -11222,6 +11250,7 @@ AM_CONDITIONAL([BUILD_HEAPMATH],[test "x$ENABLED_HEAPMATH" = "xyes" || test "x$E
AM_CONDITIONAL([BUILD_EXAMPLE_SERVERS],[test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"])
AM_CONDITIONAL([BUILD_EXAMPLE_CLIENTS],[test "x$ENABLED_EXAMPLES" = "xyes"])
AM_CONDITIONAL([BUILD_EXAMPLE_ASN1],[test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_ASN_PRINT" = "xyes" && test "$ENABLED_ASN" != "no"])
AM_CONDITIONAL([BUILD_OCSP_RESPONDER],[test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_OCSP_RESPONDER" = "xyes"])
AM_CONDITIONAL([BUILD_TESTS],[test "x$ENABLED_EXAMPLES" = "xyes"])
AM_CONDITIONAL([BUILD_THREADED_EXAMPLES],[test "x$ENABLED_SINGLETHREADED" = "xno" && test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"])
AM_CONDITIONAL([BUILD_WOLFCRYPT_TESTS],[test "x$ENABLED_CRYPT_TESTS" = "xyes"])
Expand Down
1 change: 1 addition & 0 deletions examples/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ include examples/sctp/include.am
include examples/configs/include.am
include examples/asn1/include.am
include examples/pem/include.am
include examples/ocsp_responder/include.am
EXTRA_DIST += examples/README.md
14 changes: 14 additions & 0 deletions examples/ocsp_responder/include.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# vim:ft=automake
# All paths should be given relative to the root

if BUILD_OCSP_RESPONDER
noinst_PROGRAMS += examples/ocsp_responder/ocsp_responder
noinst_HEADERS += examples/ocsp_responder/ocsp_responder.h
examples_ocsp_responder_ocsp_responder_SOURCES = examples/ocsp_responder/ocsp_responder.c
examples_ocsp_responder_ocsp_responder_LDADD = src/libwolfssl@LIBSUFFIX@.la $(LIB_STATIC_ADD)
examples_ocsp_responder_ocsp_responder_DEPENDENCIES = src/libwolfssl@LIBSUFFIX@.la
examples_ocsp_responder_ocsp_responder_CFLAGS = $(AM_CFLAGS)
endif

dist_example_DATA+= examples/ocsp_responder/ocsp_responder.c
DISTCLEANFILES+= examples/ocsp_responder/.libs/ocsp_responder
Loading
Loading