Skip to content

Commit 45829e0

Browse files
committed
Fix error message wording in previous sslinfo commit
1 parent 28120a0 commit 45829e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/sslinfo/sslinfo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
152152
if (membuf == NULL)
153153
ereport(ERROR,
154154
(errcode(ERRCODE_OUT_OF_MEMORY),
155-
errmsg("failed to create OpenSSL BIO structure")));
155+
errmsg("could not create OpenSSL BIO structure")));
156156
(void) BIO_set_close(membuf, BIO_CLOSE);
157157
ASN1_STRING_print_ex(membuf, str,
158158
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -169,7 +169,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
169169
if (dp != sp)
170170
pfree(dp);
171171
if (BIO_free(membuf) != 1)
172-
elog(ERROR, "failed to free OpenSSL BIO structure");
172+
elog(ERROR, "could not free OpenSSL BIO structure");
173173

174174
PG_RETURN_TEXT_P(result);
175175
}
@@ -311,7 +311,7 @@ X509_NAME_to_text(X509_NAME *name)
311311
if (membuf == NULL)
312312
ereport(ERROR,
313313
(errcode(ERRCODE_OUT_OF_MEMORY),
314-
errmsg("failed to create BIO")));
314+
errmsg("could not create OpenSSL BIO structure")));
315315

316316
(void) BIO_set_close(membuf, BIO_CLOSE);
317317
for (i = 0; i < count; i++)
@@ -321,15 +321,15 @@ X509_NAME_to_text(X509_NAME *name)
321321
if (nid == NID_undef)
322322
ereport(ERROR,
323323
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
324-
errmsg("failed to get NID for ASN1_OBJECT object")));
324+
errmsg("could not get NID for ASN1_OBJECT object")));
325325
v = X509_NAME_ENTRY_get_data(e);
326326
field_name = OBJ_nid2sn(nid);
327327
if (field_name == NULL)
328328
field_name = OBJ_nid2ln(nid);
329329
if (field_name == NULL)
330330
ereport(ERROR,
331331
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
332-
errmsg("failed to convert NID %d to an ASN1_OBJECT structure", nid)));
332+
errmsg("could not convert NID %d to an ASN1_OBJECT structure", nid)));
333333
BIO_printf(membuf, "/%s=", field_name);
334334
ASN1_STRING_print_ex(membuf, v,
335335
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -348,7 +348,7 @@ X509_NAME_to_text(X509_NAME *name)
348348
if (dp != sp)
349349
pfree(dp);
350350
if (BIO_free(membuf) != 1)
351-
elog(ERROR, "failed to free OpenSSL BIO structure");
351+
elog(ERROR, "could not free OpenSSL BIO structure");
352352

353353
PG_RETURN_TEXT_P(result);
354354
}

0 commit comments

Comments
 (0)