1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-05 15:55:58 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Vladislav Vaintroub
e9f02c9ea6 MENT-1263 : ma_format_win32_error could cause invalid parameter exception
If the formatted message was too long, for the buffer, sprintf_s used
in this function raises invalid parameter.

replace sprintf_s with snprintf to fix.
2021-07-19 13:33:51 +02:00
Vladislav Vaintroub
5c1fa6b145 Fix Win32 error formatting. 2020-04-16 12:40:08 +02:00
Vladislav Vaintroub
2efc52b5b7 Fix clang-tidy warnings.
simplify error handling in schannel_certs.c
2019-12-09 00:22:46 +01:00
Vladislav Vaintroub
63df45ce3d CONC-447 ERROR 2026 (HY000): SSL connection error: Certificate signature check failed
Implement proper verification for server certificate chain,
with refactoring of the certificate stuff.

If custom CA and CRL certs are given, load them into in-memory store, and
use CertVerifyCertificateChainPolicy() to verify the certificate chain.

There are minor errors fixed, such as
- now there is a support for private keys encoded as BEGIN/END PRIVATE KEY
in PEM, instead of only BEGIN/END RSA PRIVATE KEY
- memory leak around CryptAcquireContext() is fixed i.e when client loads
private key, it previously did never released it, not even when connection
ended.

The handling of certificates moved into schannel_certs.c from various places
2019-12-08 18:07:48 +01:00