)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"7f5025e4cee0251f13cadc383bebadfc678b44a2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"dcb45b42_97b43706","updated":"2025-11-11 11:10:25.000000000","message":"I think the assert is wrong.","commit_id":"c6a62bc9f872189e9979a2cf2976f2b0c743d9fc"}],"src/openvpn/ssl.c":[{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"7f5025e4cee0251f13cadc383bebadfc678b44a2","unresolved":true,"context_lines":[{"line_number":3982,"context_line":"    msg(D_TLS_DEBUG, __func__);"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    ASSERT(ks);"},{"line_number":3985,"context_line":"    ASSERT(ks-\u003ekey_id \u003c\u003d 1 \u003c\u003c P_OPCODE_SHIFT);"},{"line_number":3986,"context_line":""},{"line_number":3987,"context_line":"    uint8_t op \u003d (P_DATA_V1 \u003c\u003c P_OPCODE_SHIFT) | (uint8_t)ks-\u003ekey_id;"},{"line_number":3988,"context_line":"    ASSERT(buf_write_prepend(buf, \u0026op, 1));"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"84eda4a7_8aea915f","line":3985,"updated":"2025-11-11 11:10:25.000000000","message":"Can we add brackets here? I find this a bit hard to read since the order of \u003c\u003d and \u003c\u003c is not so super obvious. Brackets would make this a bit nicer to read.\n\nI think we should probably add a define to indicate the highest key ID, something like this:\n\n/* packet opcode (high 5 bits) and key-id (low 3 bits) are combined in one byte */\n#define P_KEY_ID_MASK  0x07\n#define P_OPCODE_SHIFT 3\n/* We use 3 bits for the key id which makes 7 the highest key id */\n#define MAXIMUM_KEY_ID 7\n\nI think this assert is also wrong since (1 \u003c\u003c 3) \u003d 8 and 8 is not an allowed key id.","commit_id":"c6a62bc9f872189e9979a2cf2976f2b0c743d9fc"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"a4276e2e5107c5c327b062f615f695a56f6c1ed3","unresolved":false,"context_lines":[{"line_number":3982,"context_line":"    msg(D_TLS_DEBUG, __func__);"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    ASSERT(ks);"},{"line_number":3985,"context_line":"    ASSERT(ks-\u003ekey_id \u003c\u003d 1 \u003c\u003c P_OPCODE_SHIFT);"},{"line_number":3986,"context_line":""},{"line_number":3987,"context_line":"    uint8_t op \u003d (P_DATA_V1 \u003c\u003c P_OPCODE_SHIFT) | (uint8_t)ks-\u003ekey_id;"},{"line_number":3988,"context_line":"    ASSERT(buf_write_prepend(buf, \u0026op, 1));"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"140f43a4_4eb0794f","line":3985,"in_reply_to":"63437cc2_76f424ff","updated":"2025-11-11 15:56:15.000000000","message":"Done","commit_id":"c6a62bc9f872189e9979a2cf2976f2b0c743d9fc"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"fd1a8b9ab43e98f12e42e200ab509729556c08ad","unresolved":true,"context_lines":[{"line_number":3982,"context_line":"    msg(D_TLS_DEBUG, __func__);"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    ASSERT(ks);"},{"line_number":3985,"context_line":"    ASSERT(ks-\u003ekey_id \u003c\u003d 1 \u003c\u003c P_OPCODE_SHIFT);"},{"line_number":3986,"context_line":""},{"line_number":3987,"context_line":"    uint8_t op \u003d (P_DATA_V1 \u003c\u003c P_OPCODE_SHIFT) | (uint8_t)ks-\u003ekey_id;"},{"line_number":3988,"context_line":"    ASSERT(buf_write_prepend(buf, \u0026op, 1));"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"63437cc2_76f424ff","line":3985,"in_reply_to":"84eda4a7_8aea915f","updated":"2025-11-11 14:28:12.000000000","message":"That would be redundant with `P_KEY_ID_MASK` I guess, so how about just using that? Changed to that for now. But definitely right about the off-by-one.","commit_id":"c6a62bc9f872189e9979a2cf2976f2b0c743d9fc"}]}
