code: public static CertificateProvider getCertificateProvider(ComponentManager manager, Store store,
          CertificateProvider certificateProvider) throws GeneralSecurityException
      {
          CertificateProvider provider = newCertificateProvider(manager, store);
  
          if (certificateProvider == null) {
              return provider;
          }
  
          return new ChainingCertificateProvider(provider, certificateProvider);
      }
docs: Get a certificate provider for a given store and an additional certificate provider.
  
  @param manager the component manager.
  @param store the store to wrap.
  @param certificateProvider provider of additional certificate to proceed to the verification.
  @return a certificate provider wrapping the store.
  @throws GeneralSecurityException if unable to initialize the provider.