modified CertificateGenerator to be synchronous. main process waits generation and extraction processes to finish