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 @@ -178,6 +178,27 @@ do_x509storeissuer(size_t num)
178178 founds [num ] = found ;
179179}
180180
181+ static void
182+ report_store_size (X509_STORE * const store , const char * const suffix ,
183+ int verbosity )
184+ {
185+ if (verbosity >= VERBOSITY_DEBUG_STATS ) {
186+ STACK_OF (X509_OBJECT ) * sk =
187+ #if OPENSSL_VERSION_NUMBER >= 0x30300000L
188+ X509_STORE_get1_objects (store );
189+ #else
190+ X509_STORE_get0_objects (store );
191+ #endif
192+
193+ fprintf (stderr , "Number of certificates in the store %s: %d\n" ,
194+ suffix , sk_X509_OBJECT_num (sk ));
195+
196+ #if OPENSSL_VERSION_NUMBER >= 0x30300000L
197+ sk_X509_OBJECT_pop_free (sk , X509_OBJECT_free );
198+ #endif
199+ }
200+ }
201+
181202static void
182203usage (char * const argv [])
183204{
@@ -410,6 +431,8 @@ main(int argc, char *argv[])
410431 if (founds == NULL )
411432 errx (EXIT_FAILURE , "Failed to create founds array" );
412433
434+ report_store_size (store , "before the test run" , verbosity );
435+
413436 x509_nonce = make_nonce (& nonce_cfg );
414437 if (x509_nonce == NULL )
415438 errx (EXIT_FAILURE , "Unable to create the nonce X509 object" );
You can’t perform that action at this time.
0 commit comments