[CDRIVER-2602] Display human-readable code for Secure Transport errors Created: 09/Apr/18  Updated: 27/Oct/23  Resolved: 15/Jun/18

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.10.0

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Spencer Mckenney
Resolution: Gone away Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

According to Secure Transport Result Codes, a SecCopyErrorMessageString() function exists to translate error codes into human-readable strings. This might be used to improve the output of "TLS handshake failed: %d" messages, as is done for OpenSSL.

Note that the function returns null if a string is not available, so that may be a case where the error message should fall back to displaying the original code. If there is prior art for how you handle this with OpenSSL (assuming it also has cases where no message is available), it'd probably be best to follow that here.



 Comments   
Comment by Kevin Albertson [ 15/Jun/18 ]

Looks like this is fixed in 1.10 by this commit.

Comment by Jeremy Mikola [ 12/Apr/18 ]

I'd defer to you, as I have no way to test this locally and I assume there is no prior art in the test suite to assert the structure of SSL error messages.

Comment by A. Jesse Jiryu Davis [ 12/Apr/18 ]

Do you want to submit a PR or shall we handle it?

Generated at Wed Feb 07 21:15:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.