[CDRIVER-3602] Prefix enum constants in OCSP callback Created: 02/Apr/20  Updated: 28/Oct/23  Resolved: 02/Apr/20

Status: Closed
Project: C Driver
Component/s: tls
Affects Version/s: None
Fix Version/s: 1.17.0-beta, 1.17.0

Type: Task Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-3408 OCSP Support Closed
Epic Link: C 4.4 Support

 Description   

The enum values introduced in 8d3aa32 for CDRIVER-3408 appear to conflict with existing constants on Windows. I picked this up during an Appveyor build for the PHP driver (see: here).

I suggest changing these to more unique names. Additionally, there are a few cases within _mongoc_ocsp_tlsext_status_cb where the SUCCESS case in our enum is used to check return values from other TLS functions (e.g. OCSP_basic_verify, X509_check_host). I'd suggest we define explicit constants for those functions rather than re-use our internal enum for the callback's return value.



 Comments   
Comment by Githook User [ 02/Apr/20 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-3602 prefix enum constants in OCSP callback

Also use specific constants for OCSP and X509 function return values.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/11a874622b7ed187b0c3fac45214218aec5815c5

Comment by Jeremy Mikola [ 02/Apr/20 ]

http://mongodbcr.appspot.com/591850003

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