mirror of https://github.com/openssl/openssl
Fix windows builds
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20109)
This commit is contained in:
parent
e787c57c53
commit
4a6e5a11c7
|
@ -2048,7 +2048,7 @@ static int save_cert_or_delete(X509 *cert, const char *file, const char *desc)
|
||||||
if (cert == NULL) {
|
if (cert == NULL) {
|
||||||
char desc_cert[80];
|
char desc_cert[80];
|
||||||
|
|
||||||
snprintf(desc_cert, sizeof(desc_cert), "%s certificate", desc);
|
BIO_snprintf(desc_cert, sizeof(desc_cert), "%s certificate", desc);
|
||||||
return delete_file(file, desc_cert);
|
return delete_file(file, desc_cert);
|
||||||
} else {
|
} else {
|
||||||
STACK_OF(X509) *certs = sk_X509_new_null();
|
STACK_OF(X509) *certs = sk_X509_new_null();
|
||||||
|
|
|
@ -506,12 +506,12 @@ int http_server_send_asn1_resp(const char *prog, BIO *cbio, int keep_alive,
|
||||||
const ASN1_ITEM *it, const ASN1_VALUE *resp)
|
const ASN1_ITEM *it, const ASN1_VALUE *resp)
|
||||||
{
|
{
|
||||||
char buf[200], *p;
|
char buf[200], *p;
|
||||||
int ret = snprintf(buf, sizeof(buf), HTTP_1_0" 200 OK\r\n%s"
|
int ret = BIO_snprintf(buf, sizeof(buf), HTTP_1_0" 200 OK\r\n%s"
|
||||||
"Content-type: %s\r\n"
|
"Content-type: %s\r\n"
|
||||||
"Content-Length: %d\r\n",
|
"Content-Length: %d\r\n",
|
||||||
keep_alive ? "Connection: keep-alive\r\n" : "",
|
keep_alive ? "Connection: keep-alive\r\n" : "",
|
||||||
content_type,
|
content_type,
|
||||||
ASN1_item_i2d(resp, NULL, it));
|
ASN1_item_i2d(resp, NULL, it));
|
||||||
|
|
||||||
if (ret < 0 || (size_t)ret >= sizeof(buf))
|
if (ret < 0 || (size_t)ret >= sizeof(buf))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -532,9 +532,9 @@ int http_server_send_status(const char *prog, BIO *cbio,
|
||||||
int status, const char *reason)
|
int status, const char *reason)
|
||||||
{
|
{
|
||||||
char buf[200];
|
char buf[200];
|
||||||
int ret = snprintf(buf, sizeof(buf), HTTP_1_0" %d %s\r\n\r\n",
|
int ret = BIO_snprintf(buf, sizeof(buf), HTTP_1_0" %d %s\r\n\r\n",
|
||||||
/* This implicitly cancels keep-alive */
|
/* This implicitly cancels keep-alive */
|
||||||
status, reason);
|
status, reason);
|
||||||
|
|
||||||
if (ret < 0 || (size_t)ret >= sizeof(buf))
|
if (ret < 0 || (size_t)ret >= sizeof(buf))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -46,7 +46,7 @@ static void log_with_prefix(const char *prog, const char *fmt, va_list ap)
|
||||||
char prefix[80];
|
char prefix[80];
|
||||||
BIO *bio, *pre = BIO_new(BIO_f_prefix());
|
BIO *bio, *pre = BIO_new(BIO_f_prefix());
|
||||||
|
|
||||||
(void)snprintf(prefix, sizeof(prefix), "%s: ", prog);
|
(void)BIO_snprintf(prefix, sizeof(prefix), "%s: ", prog);
|
||||||
(void)BIO_set_prefix(pre, prefix);
|
(void)BIO_set_prefix(pre, prefix);
|
||||||
bio = BIO_push(pre, bio_err);
|
bio = BIO_push(pre, bio_err);
|
||||||
(void)BIO_vprintf(bio, fmt, ap);
|
(void)BIO_vprintf(bio, fmt, ap);
|
||||||
|
|
|
@ -1204,8 +1204,8 @@ static int test_hpke_suite_strs(void)
|
||||||
for (kemind = 0; kemind != OSSL_NELEM(kem_str_list); kemind++) {
|
for (kemind = 0; kemind != OSSL_NELEM(kem_str_list); kemind++) {
|
||||||
for (kdfind = 0; kdfind != OSSL_NELEM(kdf_str_list); kdfind++) {
|
for (kdfind = 0; kdfind != OSSL_NELEM(kdf_str_list); kdfind++) {
|
||||||
for (aeadind = 0; aeadind != OSSL_NELEM(aead_str_list); aeadind++) {
|
for (aeadind = 0; aeadind != OSSL_NELEM(aead_str_list); aeadind++) {
|
||||||
snprintf(sstr, 128, "%s,%s,%s", kem_str_list[kemind],
|
BIO_snprintf(sstr, 128, "%s,%s,%s", kem_str_list[kemind],
|
||||||
kdf_str_list[kdfind], aead_str_list[aeadind]);
|
kdf_str_list[kdfind], aead_str_list[aeadind]);
|
||||||
if (TEST_true(OSSL_HPKE_str2suite(sstr, &stirred)) != 1) {
|
if (TEST_true(OSSL_HPKE_str2suite(sstr, &stirred)) != 1) {
|
||||||
if (verbose)
|
if (verbose)
|
||||||
TEST_note("Unexpected str2suite fail for :%s",
|
TEST_note("Unexpected str2suite fail for :%s",
|
||||||
|
|
Loading…
Reference in New Issue