mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Fix bugs
This commit is contained in:
@@ -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.1079")
|
set(CPACK_PACKAGE_VERSION "3.2.0-dev.1080")
|
||||||
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)
|
||||||
|
|||||||
@@ -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.1079"
|
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1080"
|
||||||
|
|
||||||
int gmssl_version_num(void);
|
int gmssl_version_num(void);
|
||||||
const char *gmssl_version_str(void);
|
const char *gmssl_version_str(void);
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ int hsskeygen_main(int argc, char **argv)
|
|||||||
|
|
||||||
tok = strtok(lms_types_str, ":");
|
tok = strtok(lms_types_str, ":");
|
||||||
while (tok) {
|
while (tok) {
|
||||||
|
if (levels >= sizeof(lms_types_val)/sizeof(lms_types_val[0])) {
|
||||||
|
fprintf(stderr, "%s: too many lms types\n", prog);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
if (!(lms_types_val[levels] = lms_type_from_name(tok))) {
|
if (!(lms_types_val[levels] = lms_type_from_name(tok))) {
|
||||||
fprintf(stderr, "%s: invalid lms_type `%s`\n", prog, tok);
|
fprintf(stderr, "%s: invalid lms_type `%s`\n", prog, tok);
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ bad:
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "%s: `-rdrand` is not supported on your platform\n", prog);
|
fprintf(stderr, "%s: `-rdrand` is not supported on your platform\n", prog);
|
||||||
|
goto end;
|
||||||
#endif
|
#endif
|
||||||
} else if (rdseed) {
|
} else if (rdseed) {
|
||||||
#ifdef ENABLE_INTEL_RDSEED
|
#ifdef ENABLE_INTEL_RDSEED
|
||||||
@@ -101,6 +102,7 @@ bad:
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "%s: `-rdseed` is not supported on your platform\n", prog);
|
fprintf(stderr, "%s: `-rdseed` is not supported on your platform\n", prog);
|
||||||
|
goto end;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (rand_bytes(buf, len) != 1) {
|
if (rand_bytes(buf, len) != 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user