Commit Graph
24 Commits
Author SHA1 Message Date
Dean Galvin 00843ba7d2 Merge branch 'main' into pr9949 2026-10-26 05:48:30 +13:00
jacob6769 69405e15f9 Merge remote-tracking branch 'origin/main' into fix/libressl-digest-version-paths
# Conflicts:
#	docs/dev/debt/libSceLibreSsl.md
2026-10-25 21:11:02 +09:00
wrocketdevandClaude Opus 5.5 7f295d046b feat(libSceLibreSsl): implement the OCSP status and reason strings
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:08:49 +01:00
atharvjairath 0390178ba0 feat(libressl): implement cipher metadata queries 2026-10-25 15:41:30 +05:30
jacob6769 e56245a42c Merge remote-tracking branch 'origin/main' into fix/libressl-digest-version-paths
# Conflicts:
#	core/libs/prx/libSceLibreSsl3/src/Digest.cpp
#	core/libs/tests/GuestLibreSslDigest.cpp
#	docs/dev/debt/libSceLibreSsl.md
2026-10-25 15:13:36 +09:00
AZLisme 931efc838c fix(libSceLibreSsl): handle minimum signed ASN.1 integer 2026-10-25 10:19:22 +08:00
AZLisme caa81ac8e7 test(libSceLibreSsl): pin legacy integer length behavior 2026-10-25 10:19:15 +08:00
AZLisme abd16e771d feat(libSceLibreSsl): implement ASN.1 integer and string helpers 2026-10-25 10:19:06 +08:00
Swag 1d2d3d2a5d Merge upstream/main into feat/libressl-error-queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	core/libs/prx/libSceLibreSsl/CMakeLists.txt
#	docs/dev/debt/libSceLibreSsl.md
2026-10-24 15:40:11 -04:00
jacob6769 e599306514 Merge remote-tracking branch 'origin/main' into fix/libressl-digest-version-paths
# Conflicts:
#	docs/dev/debt/libSceLibreSsl.md
2026-10-24 18:18:03 +09:00
jacob6769andClaude Opus 5.5 0fed30252a fix(libSceLibreSsl): follow LibreSSL 2.5.4 and 4.0.0 for null digest buffers and SHA-512/t lengths
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 12:01:56 +09:00
Swag 43315af395 Merge upstream/main into feat/libressl-error-queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	core/libs/prx/libSceLibreSsl/CMakeLists.txt
#	docs/dev/debt/libSceLibreSsl.md
2026-10-23 15:27:06 -04:00
Claude 24bbc6d5f8 fix(libSceLibreSsl): leave the AES key untouched when key setup fails
AES_set_encrypt_key zeroed the whole schedule and set rounds before it
checked the key length, so a refused call changed the AES_KEY. As in
LibreSSL 2.5.4's aes_core.c, it now returns -1 or -2 before writing
anything and writes only the 44, 52 or 60 words the key length needs.

The test fills the key with a sentinel and checks, for both setup
functions, that refused calls leave all 244 bytes unchanged, that
AES-128 and AES-192 keep the 16 and 8 unused words, and that every
written word matches the FIPS-197 appendix A schedules and the
decryption schedules computed independently and with OpenSSL 3.0.13.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-23 18:56:08 +00:00
HQasperandClaude Opus 5.5 c17591d425 feat(libSceLibreSsl): implement the low-level AES functions
AES_set_encrypt_key, AES_set_decrypt_key, AES_encrypt, AES_decrypt,
AES_ecb_encrypt, AES_cbc_encrypt, AES_cfb128_encrypt and
AES_ctr128_encrypt threw. They now follow LibreSSL's aes.h and its CBC,
CFB-128 and CTR mode code on the caller's 244-byte AES_KEY: key setup
returns -1 for null arguments and -2 for a key length other than 128,
192 or 256 bits, CBC pads a partial final block with the IV and writes
the whole block, CFB and CTR resume from *num, and the CTR counter
carries across all 128 bits.

The test checks the FIPS-197 appendix A and C vectors and the SP 800-38A
CBC, CFB-128 and CTR vectors, split across calls, in place and with
partial blocks.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-23 18:48:20 +00:00
Claude 687e7d637e fix(libSceLibreSsl): return null from CRYPTO_malloc for sizes of zero or less
CRYPTO_malloc threw for a size of zero or less. LibreSSL 2.5.4, 3.4.1
and 3.4.3 all take an int size and return null there, so it now does
the same, and the test checks for null instead of a throw.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-23 13:15:04 +00:00
Swag a015208694 Merge upstream/main into feat/libressl-error-queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	docs/dev/debt/libSceLibreSsl.md
2026-10-23 08:51:42 -04:00
HQasperandClaude Opus 5.5 eb9491b194 feat(libSceLibreSsl): implement RAND and the CRYPTO allocator functions
RAND_add, RAND_bytes, RAND_status, RAND_load_file, RAND_file_name,
CRYPTO_malloc, CRYPTO_free and CRYPTO_set_mem_functions threw. They now
behave as in LibreSSL 2.6.5 through 3.4.3, where these functions did not
change: RAND_bytes fills the buffer from host entropy and returns 1,
RAND_add ignores its input, RAND_status returns 1, RAND_load_file returns
123456 for -1 and the requested count otherwise, RAND_file_name copies
"/dev/urandom" with strlcpy semantics, CRYPTO_malloc and CRYPTO_free use
the guest heap, and CRYPTO_set_mem_functions refuses with 0.

CRYPTO_malloc of zero or a negative size throws because later LibreSSL
versions take a size_t and call malloc instead of returning null.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-23 12:49:06 +00:00
Swag 235612ab83 Merge upstream/main into feat/libressl-error-queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	core/libs/prx/libSceLibreSsl/CMakeLists.txt
#	docs/dev/debt/libSceLibreSsl.md
2026-10-23 08:03:05 -04:00
atharv-honestly 30ab85a8db feat(libressl): implement certificate verification error strings 2026-10-23 16:33:43 +05:30
Swag 096d93f5ec Merge upstream/main into feat/libressl-error-queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	core/libs/prx/libSceLibreSsl/CMakeLists.txt
#	docs/dev/debt/libSceLibreSsl.md
2026-10-22 23:08:29 -04:00
VakzOsandClaude Opus 5.5 1a8ee4d999 feat(libSceLibreSsl): implement DES_set_key, DES_ecb_encrypt and DES_set_odd_parity
The DES block cipher and the parity helper come from mbedtls, which is
already a submodule; DES_set_key follows LibreSSL with DES_check_key
off and stores the key in the schedule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FzhWRMauD3ouc8kSxT2NnT
2026-10-22 22:55:07 +00:00
SwagandClaude Opus 5.5 ca32e706e8 feat(libSceLibreSsl): implement the per-thread error queue
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 20:15:46 -04:00
HQasperandClaude Opus 5.5 52a439bc70 feat(libSceLibreSsl): implement the MD4, MD5, SHA-1 and SHA-2 digests
MD4, MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 Init/Update/Final and
the SHA256 one-shot threw. They now hash as LibreSSL does, on the
caller's MD4_CTX, MD5_CTX, SHA_CTX, SHA256_CTX and SHA512_CTX laid out as
in LibreSSL's md4.h, md5.h and sha.h, so a context copied or inspected
by the title stays valid: the bit count in Nl/Nh, the partial block in
data with its length in num, and md_len selecting the truncated digest.
Final pads and clears the buffer as LibreSSL's sources do.

Cases that differ between LibreSSL versions throw: SHA256 with a null
digest buffer and SHA512_Final with the SHA-512/224 or SHA-512/256
length. The test checks the RFC 1320, RFC 1321 and FIPS 180 vectors over
several chunk sizes, the context fields, copied contexts and those
cases.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-21 09:59:04 +00:00
xdCloudy 78ed190822 feat(prx): add missing libSceLibreSsl exports 2026-10-21 02:37:16 +01:00