public final void verify(publickey key)
      throws certificateexception, nosuchalgorithmexception, invalidkeyexception,
          nosuchproviderexception, signatureexception {
    signature signature;
    string signame = x509signatureutil.getsignaturename(c.getsignaturealgorithm());

    try {
      signature = signature.getinstance(signame, bouncycastleprovider.provider_name);
    } catch (exception e) {
      signature = signature.getinstance(signame);
    }

    checksignature(key, signature);
  }
  public final void verify(publickey key, string sigprovider)
      throws certificateexception, nosuchalgorithmexception, invalidkeyexception,
          nosuchproviderexception, signatureexception {
    string signame = x509signatureutil.getsignaturename(c.getsignaturealgorithm());
    signature signature = signature.getinstance(signame, sigprovider);

    checksignature(key, signature);
  }