JosiahWI commented on PR #13440:
URL: https://github.com/apache/trafficserver/pull/13440#issuecomment-5108539087

   > ../src/tscore/X509HostnameValidator.cc:269:15: error: no matching function 
for call to 'X509_NAME_get_index_by_NID'
     while ((i = X509_NAME_get_index_by_NID(name, NID_commonName, i)) >= 0) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   /usr/include/openssl/x509.h:810:5: note: candidate function not viable: 1st 
argument ('const X509_NAME *' (aka 'const X509_name_st *')) would lose const 
qualifier
   int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
   
   Apparently, not all the X509 APIs in older OpenSSL versions take the name as 
pointer to const. Would it work to use `auto` or `decltype` to determine the 
type of the local variable, so that it automatically assumes the correct type 
for both APIs? (If this approach is used, there should be a comment explaining 
why this was done.) That's just one idea; I'm interested in how you recommend 
to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to