Maaz2212 commented on issue #13985:
URL: 
https://github.com/apache/trafficserver/issues/13985#issuecomment-6977027941

   hey @maskit @bryancall 
   I'd like to pick this up. 
   
   Since `ssl_verify_client_callback()` already extracts the client's `EVP_PKEY 
*peer_rpk` via `X509_STORE_CTX_get0_rpk(ctx)` to check the pin, we could make 
it accessible to `TS_SSL_VERIFY_CLIENT_HOOK` in one of two ways:
   
   1. **Pass `ctx` through `verify_certificate(ctx)`**: This makes 
`TSVConnSslVerifyCTXGet()` return the store context on OpenSSL, allowing 
plugins to call `X509_STORE_CTX_get0_rpk()`. (Plugins would need to check for a 
null current certificate to distinguish RPK from X.509).
   2. **Add a unified API (e.g. `TSVConnSslVerifyRPKGet(svc)`)**: Retain 
`_rpk_to_verify` in `TLSBasicSupport` during the hook call on both OpenSSL and 
BoringSSL. This keeps `TSVConnSslVerifyCTXGet()` safe for existing X.509 
plugins and gives a consistent API across both TLS libraries.
   
   Do you have a preference between passing the `X509_STORE_CTX` directly vs 
adding a dedicated RPK accessor? Once aligned, I can open a PR.


-- 
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