Update tls13_server.c

This commit is contained in:
Zhi Guan
2026-06-17 15:58:11 +08:00
parent c44fbf5182
commit 7ef784a9fc
3 changed files with 5 additions and 5 deletions

View File

@@ -819,7 +819,7 @@ endif()
# #
set(CPACK_PACKAGE_NAME "GmSSL") set(CPACK_PACKAGE_NAME "GmSSL")
set(CPACK_PACKAGE_VENDOR "GmSSL develop team") set(CPACK_PACKAGE_VENDOR "GmSSL develop team")
set(CPACK_PACKAGE_VERSION "3.2.0-dev.1076") set(CPACK_PACKAGE_VERSION "3.2.0-dev.1077")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md) set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/README.md)
set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_MODIFY_PATH ON)
include(CPack) include(CPack)

View File

@@ -18,7 +18,7 @@ extern "C" {
#define GMSSL_VERSION_NUM 30200 #define GMSSL_VERSION_NUM 30200
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1076" #define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1077"
int gmssl_version_num(void); int gmssl_version_num(void);
const char *gmssl_version_str(void); const char *gmssl_version_str(void);

View File

@@ -249,21 +249,21 @@ int tls13_server_main(int argc , char **argv)
psk_dhe_ke = 1; psk_dhe_ke = 1;
} else if (!strcmp(*argv, "-psk_identity")) { } else if (!strcmp(*argv, "-psk_identity")) {
if (--argc < 1) goto bad; if (--argc < 1) goto bad;
if (psk_identities_cnt > sizeof(psk_identities)/sizeof(psk_identities[0])) { if (psk_identities_cnt >= sizeof(psk_identities)/sizeof(psk_identities[0])) {
error_print(); error_print();
return -1; return -1;
} }
psk_identities[psk_identities_cnt++] = *(++argv); psk_identities[psk_identities_cnt++] = *(++argv);
} else if (!strcmp(*argv, "-psk_cipher_suite")) { } else if (!strcmp(*argv, "-psk_cipher_suite")) {
if (--argc < 1) goto bad; if (--argc < 1) goto bad;
if (psk_cipher_suites_cnt > sizeof(psk_cipher_suites)/sizeof(psk_cipher_suites[0])) { if (psk_cipher_suites_cnt >= sizeof(psk_cipher_suites)/sizeof(psk_cipher_suites[0])) {
error_print(); error_print();
return -1; return -1;
} }
psk_cipher_suites[psk_cipher_suites_cnt++] = *(++argv); psk_cipher_suites[psk_cipher_suites_cnt++] = *(++argv);
} else if (!strcmp(*argv, "-psk_key")) { } else if (!strcmp(*argv, "-psk_key")) {
if (--argc < 1) goto bad; if (--argc < 1) goto bad;
if (psk_keys_cnt > sizeof(psk_keys)/sizeof(psk_keys[0])) { if (psk_keys_cnt >= sizeof(psk_keys)/sizeof(psk_keys[0])) {
error_print(); error_print();
return -1; return -1;
} }