Skip to content

Commit ac711dd

Browse files
committed
Fix error message wording in previous sslinfo commit
1 parent 8582cf1 commit ac711dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/sslinfo/sslinfo.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
143143
if (membuf == NULL)
144144
ereport(ERROR,
145145
(errcode(ERRCODE_OUT_OF_MEMORY),
146-
errmsg("failed to create OpenSSL BIO structure")));
146+
errmsg("could not create OpenSSL BIO structure")));
147147
(void) BIO_set_close(membuf, BIO_CLOSE);
148148
ASN1_STRING_print_ex(membuf, str,
149149
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -157,7 +157,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
157157
if (dp != sp)
158158
pfree(dp);
159159
if (BIO_free(membuf) != 1)
160-
elog(ERROR, "failed to free OpenSSL BIO structure");
160+
elog(ERROR, "could not free OpenSSL BIO structure");
161161

162162
PG_RETURN_TEXT_P(result);
163163
}
@@ -299,7 +299,7 @@ X509_NAME_to_text(X509_NAME *name)
299299
if (membuf == NULL)
300300
ereport(ERROR,
301301
(errcode(ERRCODE_OUT_OF_MEMORY),
302-
errmsg("failed to create BIO")));
302+
errmsg("could not create OpenSSL BIO structure")));
303303

304304
(void) BIO_set_close(membuf, BIO_CLOSE);
305305
for (i = 0; i < count; i++)
@@ -309,15 +309,15 @@ X509_NAME_to_text(X509_NAME *name)
309309
if (nid == NID_undef)
310310
ereport(ERROR,
311311
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
312-
errmsg("failed to get NID for ASN1_OBJECT object")));
312+
errmsg("could not get NID for ASN1_OBJECT object")));
313313
v = X509_NAME_ENTRY_get_data(e);
314314
field_name = OBJ_nid2sn(nid);
315315
if (field_name == NULL)
316316
field_name = OBJ_nid2ln(nid);
317317
if (field_name == NULL)
318318
ereport(ERROR,
319319
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
320-
errmsg("failed to convert NID %d to an ASN1_OBJECT structure", nid)));
320+
errmsg("could not convert NID %d to an ASN1_OBJECT structure", nid)));
321321
BIO_printf(membuf, "/%s=", field_name);
322322
ASN1_STRING_print_ex(membuf, v,
323323
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -333,7 +333,7 @@ X509_NAME_to_text(X509_NAME *name)
333333
if (dp != sp)
334334
pfree(dp);
335335
if (BIO_free(membuf) != 1)
336-
elog(ERROR, "failed to free OpenSSL BIO structure");
336+
elog(ERROR, "could not free OpenSSL BIO structure");
337337

338338
PG_RETURN_TEXT_P(result);
339339
}

0 commit comments

Comments
 (0)