com.wewebu.ow.server.util.jar
Class OwJarVerifier

java.lang.Object
  extended by com.wewebu.ow.server.util.jar.OwJarVerifier

public class OwJarVerifier
extends Object

Utility class for checking jar file integrity.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwJarVerifier(URL jarURL_p)
           
 
Method Summary
protected  void finalize()
           
 org.bouncycastle.cert.X509CertificateHolder[] getSignatureCertificates()
          Get Signature Certificates
static X509Certificate getWeWebUCertificate()
          Get Workdesk Certificate
 boolean isSigned()
          We'll search for a file named META-INF/*.DSA or META-INF/*.RSA
 void verify(X509Certificate targetCert_p)
          First, retrieve the jar file from the URL passed in constructor.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwJarVerifier

public OwJarVerifier(URL jarURL_p)
Method Detail

verify

public void verify(X509Certificate targetCert_p)
            throws IOException
First, retrieve the jar file from the URL passed in constructor. Then, compare it to the expected X509Certificate. If everything went well and the certificates are the same, no exception is thrown.

Parameters:
targetCert_p -
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

isSigned

public boolean isSigned()
We'll search for a file named META-INF/*.DSA or META-INF/*.RSA

Returns:
true if this jar is signed

getSignatureCertificates

public org.bouncycastle.cert.X509CertificateHolder[] getSignatureCertificates()
                                                                       throws IOException,
                                                                              org.bouncycastle.cms.CMSException
Get Signature Certificates

Returns:
X509Certificate[]
Throws:
IOException
org.bouncycastle.cms.CMSException

getWeWebUCertificate

public static X509Certificate getWeWebUCertificate()
                                            throws IOException,
                                                   CertificateException
Get Workdesk Certificate

Returns:
X509Certificate
Throws:
IOException
CertificateException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.