)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000035,"name":"syzzer","display_name":"Steffan Karger","email":"steffan@karger.me","username":"syzzer","status":"Commits and comments are my own views, not those of my employer."},"change_message_id":"1d5a7750f5583926387befee0966826bc928a67f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ae5b7bd6_f488937e","updated":"2025-12-15 16:00:39.000000000","message":"A few initials thoughts when glazing over part of the code.","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"9c9e7554f0f1d2b55067dcaeea8386bcf95b8ae9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5fc15a06_74b7840b","updated":"2026-01-14 16:56:40.000000000","message":"I have added http://gerrit.openvpn.net/c/openvpn/+/1474 that updates the GHA definition to use mbedtls 4. But it has multiple failures (see https://github.com/flichtenheld/openvpn/actions/runs/21002319306/job/60375385060)\n\nOn Ubuntu 22.04 it builds but then fails in t_server_null.sh with\n\n    2026-01-14 16:50:43 Mbed TLS 4 only supports pre-defined Diffie-Hellman groups.\n    2026-01-14 16:50:43 Exiting due to fatal error\n\nOn Ubuntu 24.04 it doesn\u0027t build\n\n```\n  CC       ssl_mbedtls.o\nssl_mbedtls.c:607:1: error: unused function \u0027external_pkcs1_sign\u0027 [-Werror,-Wunused-function]\nexternal_pkcs1_sign(void *ctx_voidptr, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,\n^\nssl_mbedtls.c:703:1: error: unused function \u0027external_key_len\u0027 [-Werror,-Wunused-function]\nexternal_key_len(void *vctx)\n^\n2 errors generated.\n```","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"2fc30e2b1d0ccbd97b86114216cf99728f05b829","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"ebfe3076_e9d9648c","updated":"2026-01-21 14:22:32.000000000","message":"There is something wrong with connecting to an OpenSSL based OpeNVPN, e.g. against community VPN:\n\nsudo ./src/openvpn/openvpn --config ~/ovpn/confs/community.ovpn    --script-security 2\n\nPassword:\n2026-01-21 15:21:34 DEPRECATED OPTION: --persist-key option ignored. Keys are now always persisted across restarts. \n2026-01-21 15:21:34 OpenVPN 2.7_rc5 [git:review/mbedtls4/2cc00e80bca26c1c+*] aarch64-apple-darwin25.2.0 [SSL (mbed TLS)] [LZO] [LZ4] [MH/RECVDA] [AEAD] built on Jan 21 2026\n2026-01-21 15:21:34 library versions: mbed TLS 4.0.0, LZO 2.10\n2026-01-21 15:21:34 TCP/UDP: Preserving recently used remote address: [AF_INET]3.69.106.84:1194\n2026-01-21 15:21:34 Socket Buffers: R\u003d[786896-\u003e786896] S\u003d[9216-\u003e9216]\n2026-01-21 15:21:34 UDPv4 link local: (not bound)\n2026-01-21 15:21:34 UDPv4 link remote: [AF_INET]3.69.106.84:1194\n2026-01-21 15:21:34 TLS: Initial packet from [AF_INET]3.69.106.84:1194, sid\u003d709f8846 9d2eb04d\n2026-01-21 15:21:34 VERIFY OK: depth\u003d1, C\u003dUS, ST\u003dCA, L\u003dPleasanton, O\u003dopenvpn.net, OU\u003dMy Organizational Unit, CN\u003dChangeMe, emailAddress\u003dcommunity@openvpn.net\n2026-01-21 15:21:34 Validating certificate key usage\n2026-01-21 15:21:34 VERIFY KU OK\n2026-01-21 15:21:34 Validating certificate extended key usage\n2026-01-21 15:21:34 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication\n2026-01-21 15:21:34 NOTE: --mute triggered...\n2026-01-21 15:21:34 2 variation(s) on previous 20 message(s) suppressed by --mute\n2026-01-21 15:21:34 TLS_ERROR: read tls_read_plaintext error: SSL - * Received NewSessionTicket Post Handshake Message. This error code is experimental and may be changed or removed without notice\n2026-01-21 15:21:34 TLS Error: TLS object -\u003e incoming plaintext read error\n2026-01-21 15:21:34 TLS Error: TLS handshake failed","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"394453ae9ebf6b37b1a55572902356b3708bce00","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"f25e0a63_ee077f94","in_reply_to":"3b9ba4d6_d08ccad8","updated":"2026-01-15 17:44:22.000000000","message":"Good questions regarding --dh. Not sure what is the best solution. Maybe something to discuss in an IRC meeting?\n\nFix for the second failure should be trivial pre-processor fix. Just do not emit this code when it is unused.","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"d0335df701fcaa19ce8180c2a8a85a5ce85a10c5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3b9ba4d6_d08ccad8","in_reply_to":"5fc15a06_74b7840b","updated":"2026-01-15 15:56:39.000000000","message":"The reason for the first error is what it says on the tin: Mbed TLS 4 just doesn\u0027t have a function to load Diffie-Hellman moduli from files. I don\u0027t know what to do about that. Should I make the error non-fatal, log a warning and ignore the dh file? Or maybe remove the dh option from the Mbed TLS build and then we can add \"ignore-unknown-option dh\" to the config?\n\nI\u0027ll look into the 2nd point, but I don\u0027t think stock Mbed TLS 4 can support external signatures at all...","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"1dda46e8c134bcfd70441adaa49aca6022f89e60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3a3be0e5_45c53795","in_reply_to":"ebfe3076_e9d9648c","updated":"2026-01-22 17:47:18.000000000","message":"After looking around a bit, I found that this error code isn\u0027t exactly an error, but it\u0027s meant to tell the application \"there\u0027s a new session ticket, if you want to do anything with that\" (see e.g. https://github.com/Mbed-TLS/mbedtls/issues/8749).\n\nIn 3.6 it used to be the case that you had to opt in to that by calling mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets but that function seems to be gone. Disabling session tickets altogether with mbedtls_ssl_conf_session_tickets doesn\u0027t seem to do anything in TLS 1.3 either. I did a git grep on the mbedtls source, it doesn\u0027t seem to be checked at all in ssl_tls13.c.\n\nSo ultimately I decided to just treat this error code like WANT_READ or WANT_WRITE and keep running. With that change, I can connect an openvpn-mbedtls client to an openssl server, and ignoring the error doesn\u0027t seem to cause any problems.","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"dd3cec98622c7ce5c70ebac94efc858e01d98844","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"0cf8ef5e_cfba2250","in_reply_to":"f25e0a63_ee077f94","updated":"2026-01-21 16:35:35.000000000","message":"Done","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"1dda46e8c134bcfd70441adaa49aca6022f89e60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"52217a05_2598da3d","updated":"2026-01-22 17:47:18.000000000","message":"Fixed connecting an mbedtls client to an openssl server. Also updated README.mbedtls.","commit_id":"c5302df42d2faf18216dba313ce1502c3590b2fb"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"f6d9c1126cdc468757fb6b8018776f55f71f5488","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"975c6f2c_f37dfc12","updated":"2026-01-22 14:19:58.000000000","message":"I rebased onto master, removed the error when running with --dh none, and changed the options in test_server_null to --dh none in order to avoid the error, as discussed in yesterday\u0027s IRC meeting.\n\nI still need to look at Arne\u0027s comment.","commit_id":"c5302df42d2faf18216dba313ce1502c3590b2fb"}],"src/openvpn/crypto_mbedtls.c":[{"author":{"_account_id":1000035,"name":"syzzer","display_name":"Steffan Karger","email":"steffan@karger.me","username":"syzzer","status":"Commits and comments are my own views, not those of my employer."},"change_message_id":"1d5a7750f5583926387befee0966826bc928a67f","unresolved":true,"context_lines":[{"line_number":85,"context_line":"/* The library doesn\u0027t support looking up algorithms by string anymore, so here"},{"line_number":86,"context_line":" * is a lookup table. */"},{"line_number":87,"context_line":"static const cipher_info_t cipher_info_table[] \u003d {"},{"line_number":88,"context_line":"/* TODO: Complete the table. */"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"/* AES */"},{"line_number":91,"context_line":"#if PSA_WANT_KEY_TYPE_AES"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"ddbc1422_631be2a6","line":88,"updated":"2025-12-15 16:00:39.000000000","message":"Consider copying the table from the private mbedtls header file, might save you some work. And complain with mbedtls that they broke a useful API...","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"0c933be8b0d3fb04875f094cfe5d84b85d988bf6","unresolved":true,"context_lines":[{"line_number":85,"context_line":"/* The library doesn\u0027t support looking up algorithms by string anymore, so here"},{"line_number":86,"context_line":" * is a lookup table. */"},{"line_number":87,"context_line":"static const cipher_info_t cipher_info_table[] \u003d {"},{"line_number":88,"context_line":"/* TODO: Complete the table. */"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"/* AES */"},{"line_number":91,"context_line":"#if PSA_WANT_KEY_TYPE_AES"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"31ee5c24_5c1a094c","line":88,"in_reply_to":"ddbc1422_631be2a6","updated":"2025-12-15 16:42:18.000000000","message":"I looked at it and I\u0027m not sure how much it helps. The new PSA_KEY_TYPE and PSA_ALG magic numbers don\u0027t seem to be in that table. I also don\u0027t know if legacy crypto defines like MBEDTLS_AES_C are externally visible.","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000035,"name":"syzzer","display_name":"Steffan Karger","email":"steffan@karger.me","username":"syzzer","status":"Commits and comments are my own views, not those of my employer."},"change_message_id":"1d5a7750f5583926387befee0966826bc928a67f","unresolved":true,"context_lines":[{"line_number":201,"context_line":"    {"},{"line_number":202,"context_line":"        return 0;"},{"line_number":203,"context_line":"    }"},{"line_number":204,"context_line":"    return (int)cipher_info-\u003ekey_bytes;"},{"line_number":205,"context_line":"}"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"int"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"35ed3edf_fa15f561","line":204,"updated":"2025-12-15 16:00:39.000000000","message":"key_bytes is already int, right?","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"0c933be8b0d3fb04875f094cfe5d84b85d988bf6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    {"},{"line_number":202,"context_line":"        return 0;"},{"line_number":203,"context_line":"    }"},{"line_number":204,"context_line":"    return (int)cipher_info-\u003ekey_bytes;"},{"line_number":205,"context_line":"}"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"int"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"26d91568_0d8c32b2","line":204,"in_reply_to":"35ed3edf_fa15f561","updated":"2025-12-15 16:42:18.000000000","message":"Right","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000035,"name":"syzzer","display_name":"Steffan Karger","email":"steffan@karger.me","username":"syzzer","status":"Commits and comments are my own views, not those of my employer."},"change_message_id":"1d5a7750f5583926387befee0966826bc928a67f","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    cipher_ctx_t *ctx;"},{"line_number":290,"context_line":"    /* Initializing the object with zeros ensures that it is always safe to call"},{"line_number":291,"context_line":"     * cipher_ctx_free. */"},{"line_number":292,"context_line":"    ALLOC_OBJ_CLEAR(ctx, cipher_ctx_t);"},{"line_number":293,"context_line":"    return ctx;"},{"line_number":294,"context_line":"}"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":3,"id":"eaf36ed8_1b9ab022","line":292,"updated":"2025-12-15 16:00:39.000000000","message":"Good catch, adding the _CLEAR.","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000035,"name":"syzzer","display_name":"Steffan Karger","email":"steffan@karger.me","username":"syzzer","status":"Commits and comments are my own views, not those of my employer."},"change_message_id":"1d5a7750f5583926387befee0966826bc928a67f","unresolved":true,"context_lines":[{"line_number":296,"context_line":"void"},{"line_number":297,"context_line":"cipher_ctx_free(cipher_ctx_t *ctx)"},{"line_number":298,"context_line":"{"},{"line_number":299,"context_line":"    /* TODO: Log warning on errors? */"},{"line_number":300,"context_line":"    if (cipher_ctx_mode_aead(ctx))"},{"line_number":301,"context_line":"    {"},{"line_number":302,"context_line":"        psa_aead_abort(\u0026ctx-\u003eoperation.aead);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"b63901cc_f7bfd9e1","line":299,"updated":"2025-12-15 16:00:39.000000000","message":"We can\u0027t handle the error here. If this errors out, looks to me like we are in an invalid state. Consider ASSERT()\u0027in out if it fails.","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"0c933be8b0d3fb04875f094cfe5d84b85d988bf6","unresolved":false,"context_lines":[{"line_number":296,"context_line":"void"},{"line_number":297,"context_line":"cipher_ctx_free(cipher_ctx_t *ctx)"},{"line_number":298,"context_line":"{"},{"line_number":299,"context_line":"    /* TODO: Log warning on errors? */"},{"line_number":300,"context_line":"    if (cipher_ctx_mode_aead(ctx))"},{"line_number":301,"context_line":"    {"},{"line_number":302,"context_line":"        psa_aead_abort(\u0026ctx-\u003eoperation.aead);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"50b21610_ae2e0509","line":299,"in_reply_to":"b63901cc_f7bfd9e1","updated":"2025-12-15 16:42:18.000000000","message":"I added ASSERTs to this and similar functions.","commit_id":"606cb0773a655c9b4da7066f6ca078279b05a60d"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"7d3ca09c70a16e6b79ed66f91f1bab23f4c0eb1a","unresolved":true,"context_lines":[{"line_number":608,"context_line":"    /* TODO: Fill out table. */"},{"line_number":609,"context_line":"    { \"MD5\", PSA_ALG_MD5 },"},{"line_number":610,"context_line":"    { \"SHA1\", PSA_ALG_SHA_1 },"},{"line_number":611,"context_line":"    { \"SHA256\", PSA_ALG_SHA_256 },"},{"line_number":612,"context_line":"};"},{"line_number":613,"context_line":"const size_t md_info_table_entries \u003d sizeof(md_info_table) / sizeof(md_info_t);"},{"line_number":614,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"32a319ea_8293f4ed","line":611,"updated":"2026-01-23 13:33:28.000000000","message":"We probably want to a few more of the common algorithms here in a follow up commit or in the next version of this commit. At least SHA384 and SHA512 are pretty common and SHA224 wouldn\u0027t hurt either.\n\n#define PSA_ALG_SHA3_224                        ((psa_algorithm_t) 0x02000010)\n/** SHA3-256 */\n#define PSA_ALG_SHA3_256                        ((psa_algorithm_t) 0x02000011)\n/** SHA3-384 */\n#define PSA_ALG_SHA3_384                        ((psa_algorithm_t) 0x02000012)\n/** SHA3-512 */\n#define PSA_ALG_SHA3_512                        ((psa_algorithm_t) 0x02000013)\n\nseem also good candidates to already add here to future proof it a bit.","commit_id":"81773cf511519b24002c41ac4438d36ad579e854"}],"src/openvpn/ssl_mbedtls.c":[{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"40c664ed5069a73a6c1601798c2ff0bcc6e7ace8","unresolved":true,"context_lines":[{"line_number":607,"context_line":"external_pkcs1_sign(void *ctx_voidptr, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,"},{"line_number":608,"context_line":"                    mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash,"},{"line_number":609,"context_line":"                    unsigned char *sig)"},{"line_number":610,"context_line":"{"},{"line_number":611,"context_line":"#if MBEDTLS_VERSION_NUMBER \u003e\u003d 0x04000000"},{"line_number":612,"context_line":"    msg(M_WARN, \"external_pkcs1_sign is not implemented for Mbed TLS 4.\");"},{"line_number":613,"context_line":"    return 1;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"46ea0c7e_a2445a5e","line":610,"updated":"2026-01-21 13:04:01.000000000","message":"/Users/arne/oss/openvpn-git/src/openvpn/ssl_mbedtls.c:609:1: error: unused function \u0027external_pkcs1_sign\u0027 [-Werror,-Wunused-function]\n  609 | external_pkcs1_sign(void *ctx_voidptr, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,\n  \n  And I do not see this function being used anywhere. Please double check this with Werror.","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000030,"name":"MaxF","email":"max@max-fillinger.net","username":"MaxF"},"change_message_id":"1dda46e8c134bcfd70441adaa49aca6022f89e60","unresolved":false,"context_lines":[{"line_number":607,"context_line":"external_pkcs1_sign(void *ctx_voidptr, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,"},{"line_number":608,"context_line":"                    mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash,"},{"line_number":609,"context_line":"                    unsigned char *sig)"},{"line_number":610,"context_line":"{"},{"line_number":611,"context_line":"#if MBEDTLS_VERSION_NUMBER \u003e\u003d 0x04000000"},{"line_number":612,"context_line":"    msg(M_WARN, \"external_pkcs1_sign is not implemented for Mbed TLS 4.\");"},{"line_number":613,"context_line":"    return 1;"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"9eb67876_ce448f68","line":610,"in_reply_to":"46ea0c7e_a2445a5e","updated":"2026-01-22 17:47:18.000000000","message":"Fixed. The unused function is ifdefd out now.","commit_id":"91752b9354c6a028de1d7518cc3a4269fcfb9113"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"7d3ca09c70a16e6b79ed66f91f1bab23f4c0eb1a","unresolved":true,"context_lines":[{"line_number":359,"context_line":"    /* TODO: Fill out the table. */"},{"line_number":360,"context_line":"    { \"secp256r1\", MBEDTLS_SSL_IANA_TLS_GROUP_SECP256R1 },"},{"line_number":361,"context_line":"    { \"secp384r1\", MBEDTLS_SSL_IANA_TLS_GROUP_SECP384R1 },"},{"line_number":362,"context_line":"    { \"X25519\", MBEDTLS_SSL_IANA_TLS_GROUP_X25519 },"},{"line_number":363,"context_line":"    { \"ffdhe2048\", MBEDTLS_SSL_IANA_TLS_GROUP_FFDHE2048 },"},{"line_number":364,"context_line":"    { \"ffdhe3072\", MBEDTLS_SSL_IANA_TLS_GROUP_FFDHE3072 },"},{"line_number":365,"context_line":"    { \"ffdhe4096\", MBEDTLS_SSL_IANA_TLS_GROUP_FFDHE4096 },"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"3877c185_ffe25e3e","line":362,"updated":"2026-01-23 13:33:28.000000000","message":"MBEDTLS_SSL_IANA_TLS_GROUP_X448 should also be added here I think.\n\nAlso secp521r1. For the european context in goverment stuff, often the brain pool curves are also used, so I am surprised they are missing here.","commit_id":"81773cf511519b24002c41ac4438d36ad579e854"}]}
