File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,27 @@ do_x509storeissuer(size_t num)
320320 founds [num ] = found ;
321321}
322322
323+ static void
324+ report_store_size (X509_STORE * const store , const char * const suffix ,
325+ int verbosity )
326+ {
327+ if (verbosity >= VERBOSITY_DEBUG_STATS ) {
328+ STACK_OF (X509_OBJECT ) * sk =
329+ #if OPENSSL_VERSION_NUMBER >= 0x30300000L
330+ X509_STORE_get1_objects (store );
331+ #else
332+ X509_STORE_get0_objects (store );
333+ #endif
334+
335+ fprintf (stderr , "Number of certificates in the store %s: %d\n" ,
336+ suffix , sk_X509_OBJECT_num (sk ));
337+
338+ #if OPENSSL_VERSION_NUMBER >= 0x30300000L
339+ sk_X509_OBJECT_pop_free (sk , X509_OBJECT_free );
340+ #endif
341+ }
342+ }
343+
323344static void
324345usage (char * const argv [])
325346{
@@ -479,6 +500,8 @@ main(int argc, char *argv[])
479500 if (founds == NULL )
480501 errx (EXIT_FAILURE , "Failed to create founds array" );
481502
503+ report_store_size (store , "before the test run" , verbosity );
504+
482505 x509_nonce = make_nonce (& nonce_cfg );
483506 if (x509_nonce == NULL )
484507 errx (EXIT_FAILURE , "Unable to create the nonce X509 object" );
You can’t perform that action at this time.
0 commit comments