Class JarUtils

java.lang.Object
org.apache.harmony.security.utils.JarUtils

public class JarUtils
extends Object
  • Constructor Details

    • JarUtils

      public JarUtils()
  • Method Details

    • verifySignature

      public static Certificate[] verifySignature​(InputStream signature, InputStream signatureBlock) throws IOException, GeneralSecurityException
      This method handle all the work with PKCS7, ASN1 encoding, signature verifying, and certification path building. See also PKCS #7: Cryptographic Message Syntax Standard: http://www.ietf.org/rfc/rfc2315.txt
      Parameters:
      signature - - the input stream of signature file to be verified
      signatureBlock - - the input stream of corresponding signature block file
      Returns:
      array of certificates used to verify the signature file
      Throws:
      IOException - - if some errors occurs during reading from the stream
      GeneralSecurityException - - if signature verification process fails