Skip to content

Instantly share code, notes, and snippets.

@mattstevens
Created November 13, 2015 23:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mattstevens/fa099d99f2fa7247c65e to your computer and use it in GitHub Desktop.
X509_STORE *store;
// set up the store
X509_VERIFY_PARAM *param = X509_VERIFY_PARAM_new();
X509_VERIFY_PARAM_set_time(param, time_from_receipt); // option 1: verify using a specific time
//X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_NO_CHECK_TIME); // option 2: relatively new option to disable time checking
X509_STORE_set1_param(store, param);
X509_VERIFY_PARAM_free(param);
// call PKCS7_verify() using configured store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment