Create a gist now

Instantly share code, notes, and snippets.

@mattstevens /pkcs7.c Secret
Created Nov 13, 2015

What would you like to do?
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