forked from radiator-software/p5-net-ssleay
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
FractalBoy edited this page Feb 6, 2019
·
2 revisions
Need to add the following functions to add functionality to check untrusted cert chain.
PEM_X509_INFO_read_bio
sk_X509_INFO_num
sk_X509_INFO_value
sk_X509_new
sk_X509_push
Basic algorithm:
- Use PEM_X509_INFO_read_bio to read PEM file into STACK_OF(X509_INFO)
- Create a STACK_OF(X509) using sk_X509_new
- Loop over STACK_OF(X509_INFO) using sk_X509_INFO_num and sk_X509_INFO_value
- Add info->x509 to STACK_OF(X509) (not sure how to do this in perl - probably need to write function to return value
- Call X509_STORE_CTX_init with chain set to the STACK_OF(X509) that we created