Skip to content

Commit bbbe5a9

Browse files
committed
Fix error message wording in previous sslinfo commit
1 parent 58feb1a commit bbbe5a9

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
@@ -141,7 +141,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
141141
if (membuf == NULL)
142142
ereport(ERROR,
143143
(errcode(ERRCODE_OUT_OF_MEMORY),
144-
errmsg("failed to create OpenSSL BIO structure")));
144+
errmsg("could not create OpenSSL BIO structure")));
145145
(void) BIO_set_close(membuf, BIO_CLOSE);
146146
ASN1_STRING_print_ex(membuf, str,
147147
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -155,7 +155,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
155155
if (dp != sp)
156156
pfree(dp);
157157
if (BIO_free(membuf) != 1)
158-
elog(ERROR, "failed to free OpenSSL BIO structure");
158+
elog(ERROR, "could not free OpenSSL BIO structure");
159159

160160
PG_RETURN_TEXT_P(result);
161161
}
@@ -297,7 +297,7 @@ X509_NAME_to_text(X509_NAME *name)
297297
if (membuf == NULL)
298298
ereport(ERROR,
299299
(errcode(ERRCODE_OUT_OF_MEMORY),
300-
errmsg("failed to create BIO")));
300+
errmsg("could not create OpenSSL BIO structure")));
301301

302302
(void) BIO_set_close(membuf, BIO_CLOSE);
303303
for (i = 0; i < count; i++)
@@ -307,15 +307,15 @@ X509_NAME_to_text(X509_NAME *name)
307307
if (nid == NID_undef)
308308
ereport(ERROR,
309309
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
310-
errmsg("failed to get NID for ASN1_OBJECT object")));
310+
errmsg("could not get NID for ASN1_OBJECT object")));
311311
v = X509_NAME_ENTRY_get_data(e);
312312
field_name = OBJ_nid2sn(nid);
313313
if (field_name == NULL)
314314
field_name = OBJ_nid2ln(nid);
315315
if (field_name == NULL)
316316
ereport(ERROR,
317317
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
318-
errmsg("failed to convert NID %d to an ASN1_OBJECT structure", nid)));
318+
errmsg("could not convert NID %d to an ASN1_OBJECT structure", nid)));
319319
BIO_printf(membuf, "/%s=", field_name);
320320
ASN1_STRING_print_ex(membuf, v,
321321
((ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB)
@@ -331,7 +331,7 @@ X509_NAME_to_text(X509_NAME *name)
331331
if (dp != sp)
332332
pfree(dp);
333333
if (BIO_free(membuf) != 1)
334-
elog(ERROR, "failed to free OpenSSL BIO structure");
334+
elog(ERROR, "could not free OpenSSL BIO structure");
335335

336336
PG_RETURN_TEXT_P(result);
337337
}

0 commit comments

Comments
 (0)