diff --git a/patch/chromium.patch b/patch/chromium.patch index 8ed6ebf..ba5d285 100644 --- a/patch/chromium.patch +++ b/patch/chromium.patch @@ -1023,7 +1023,7 @@ index 236de0c0bb686..a282b59661258 100644 +extern "C" { +void gostssl_newsession( SSL * s, const void * cachestring, size_t len, const void * cert, int size, const char * ciphers, const char * tlsmode ); +void gostssl_certhook( void * cert, int size ); -+void gostssl_verifyhook( void * s, const char * host, unsigned * is_gost, char offline ); ++void gostssl_verifyhook( void * s, const char * host, int32_t * is_gost, char offline ); +int gostssl_is_msspi( SSL * s ); +} +int SSLClientSocketImpl::IsMSSPI() { @@ -1032,18 +1032,18 @@ index 236de0c0bb686..a282b59661258 100644 +int SSLClientSocketImpl::VerifyGOSTResult(int32_t gost_status) +{ +#ifndef TRUST_E_CERT_SIGNATURE -+#define TRUST_E_CERT_SIGNATURE 0x80096004L -+#define CRYPT_E_REVOKED 0x80092010L -+#define CERT_E_UNTRUSTEDROOT 0x800B0109L -+#define CERT_E_UNTRUSTEDTESTROOT 0x800B010DL -+#define CERT_E_REVOCATION_FAILURE 0x800B010EL -+#define CERT_E_EXPIRED 0x800B0101L -+#define CERT_E_INVALID_NAME 0x800B0114L -+#define CERT_E_CN_NO_MATCH 0x800B010FL -+#define CERT_E_VALIDITYPERIODNESTING 0x800B0102L -+#define CRYPT_E_NO_REVOCATION_CHECK 0x80092012L -+#define CRYPT_E_REVOCATION_OFFLINE 0x80092013L -+#define CERT_E_CHAINING 0x800B010AL ++#define TRUST_E_CERT_SIGNATURE (int32_t)0x80096004L ++#define CRYPT_E_REVOKED (int32_t)0x80092010L ++#define CERT_E_UNTRUSTEDROOT (int32_t)0x800B0109L ++#define CERT_E_UNTRUSTEDTESTROOT (int32_t)0x800B010DL ++#define CERT_E_REVOCATION_FAILURE (int32_t)0x800B010EL ++#define CERT_E_EXPIRED (int32_t)0x800B0101L ++#define CERT_E_INVALID_NAME (int32_t)0x800B0114L ++#define CERT_E_CN_NO_MATCH (int32_t)0x800B010FL ++#define CERT_E_VALIDITYPERIODNESTING (int32_t)0x800B0102L ++#define CRYPT_E_NO_REVOCATION_CHECK (int32_t)0x80092012L ++#define CRYPT_E_REVOCATION_OFFLINE (int32_t)0x80092013L ++#define CERT_E_CHAINING (int32_t)0x800B010AL +#endif + + int gost_rv; diff --git a/src/gostssl.cpp b/src/gostssl.cpp index f8384d3..4ad6b2b 100644 --- a/src/gostssl.cpp +++ b/src/gostssl.cpp @@ -417,7 +417,7 @@ static GostSSL_Worker * workers_api( const SSL * s, WORKER_DB_ACTION action, con if( cachestring ) msspi_set_cachestring( w->h, cachestring ); if( s->config->alpn_client_proto_list.size() ) - msspi_set_alpn( w->h, (const char *)s->config->alpn_client_proto_list.data(), (unsigned)s->config->alpn_client_proto_list.size() ); + msspi_set_alpn( w->h, (const char *)s->config->alpn_client_proto_list.data(), s->config->alpn_client_proto_list.size() ); if( cert && size ) msspi_set_mycert( w->h, (const char *)cert, size ); } @@ -770,7 +770,7 @@ void gostssl_free( SSL * s ) workers_api( s, WDB_FREE ); } -void gostssl_verifyhook( void * s, const char * host, unsigned * gost_status, char offline ) +void gostssl_verifyhook( void * s, const char * host, int32_t * gost_status, char offline ) { *gost_status = 0; @@ -790,7 +790,7 @@ void gostssl_verifyhook( void * s, const char * host, unsigned * gost_status, ch *gost_status = 1; break; case MSSPI_VERIFY_ERROR: - *gost_status = (unsigned)CERT_E_CRITICAL; + *gost_status = (int32_t)CERT_E_CRITICAL; break; case CRYPT_E_NO_REVOCATION_CHECK: // Mask off CERT_STATUS_NO_REVOCATION_MECHANISM diff --git a/src/msspi b/src/msspi index 4192f80..192d266 160000 --- a/src/msspi +++ b/src/msspi @@ -1 +1 @@ -Subproject commit 4192f80665935e77719c37e4610ed84cb42d7e30 +Subproject commit 192d2662e058453313e6f824099ace60ca6fd242