mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-27 15:43:42 +08:00
Remove incorrect path_len_constraint check
This commit is contained in:
@@ -820,7 +820,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.1091")
|
set(CPACK_PACKAGE_VERSION "3.2.0-dev.1092")
|
||||||
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.1091"
|
#define GMSSL_VERSION_STR "GmSSL 3.2.0-dev.1092"
|
||||||
|
|
||||||
int gmssl_version_num(void);
|
int gmssl_version_num(void);
|
||||||
const char *gmssl_version_str(void);
|
const char *gmssl_version_str(void);
|
||||||
|
|||||||
@@ -1943,12 +1943,6 @@ int x509_certs_verify(const uint8_t *certs, size_t certslen, int certs_type,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path_len == 0) {
|
|
||||||
if (path_len_constraint != 0) {
|
|
||||||
error_print();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((path_len_constraint >= 0 && path_len > path_len_constraint)
|
if ((path_len_constraint >= 0 && path_len > path_len_constraint)
|
||||||
|| path_len > depth) {
|
|| path_len > depth) {
|
||||||
error_print();
|
error_print();
|
||||||
@@ -2067,11 +2061,6 @@ int x509_certs_verify_tlcp(const uint8_t *certs, size_t certslen, int certs_type
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path_len == 0) {
|
if (path_len == 0) {
|
||||||
if (path_len_constraint != 0) {
|
|
||||||
error_print();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// verify entity key encipherment cert
|
// verify entity key encipherment cert
|
||||||
if (x509_cert_verify_by_ca_cert(kenc_cert, kenc_certlen, cacert, cacertlen,
|
if (x509_cert_verify_by_ca_cert(kenc_cert, kenc_certlen, cacert, cacertlen,
|
||||||
SM2_DEFAULT_ID, SM2_DEFAULT_ID_LENGTH) != 1) {
|
SM2_DEFAULT_ID, SM2_DEFAULT_ID_LENGTH) != 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user