Skip to content

Commit

Permalink
moving to predictable types
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed Mar 26, 2024
1 parent 98b8de1 commit 88aa765
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions patch/chromium.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/gostssl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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;

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/msspi
Submodule msspi updated 1 files
+19 −19 src/msspi.h

0 comments on commit 88aa765

Please sign in to comment.