it.haefelinger.flaka.util
Class InitSSL

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by it.haefelinger.flaka.Task
              extended by it.haefelinger.flaka.util.InitSSL
All Implemented Interfaces:
Cloneable

public class InitSSL
extends Task

Utility class for configuring and testing JSSE for various JDKs

Since:
1.0
Author:
merzedes

Nested Class Summary
static class InitSSL.AntiX509TrustManager
           
static class InitSSL.SSLSocketFactory
           
 
Field Summary
protected  boolean quiet
           
protected  File truststore
           
protected  boolean verifycert
           
 
Fields inherited from class it.haefelinger.flaka.Task
debug, el
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
InitSSL()
           
 
Method Summary
 void execute()
           
protected  File getDefaultTrustStore()
           
protected  String getTrustStore()
           
protected  boolean hasTrustStore()
           
static void install(TrustManager tm)
           
static boolean isjava15()
           
 void setQuiet(boolean b)
           
 void setTrustStore(File file)
           
 void setVerifyCertificate(boolean b)
           
protected  String useTrustStore(File f)
          Provide a full path to a keystore loc.
 
Methods inherited from class it.haefelinger.flaka.Task
debug, debug, error, error, getProperty, getref, info, log, setDebug, setEl, throwbx, throwbx, toFile, verbose, warn, warn
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

truststore

protected File truststore

verifycert

protected boolean verifycert

quiet

protected boolean quiet
Constructor Detail

InitSSL

public InitSSL()
Method Detail

setTrustStore

public void setTrustStore(File file)

setVerifyCertificate

public void setVerifyCertificate(boolean b)

setQuiet

public void setQuiet(boolean b)

isjava15

public static boolean isjava15()

install

public static void install(TrustManager tm)
                    throws Exception
Throws:
Exception

useTrustStore

protected String useTrustStore(File f)
Provide a full path to a keystore loc. This keystore will then be used for * the verification of certificates provided by the server (assuming that the * default TrustManager - which makes use of property javax.net.ssl.trustStore - * is installed. * *

Returns:
previous value of javax.net.ssl.trustStore

hasTrustStore

protected boolean hasTrustStore()

getTrustStore

protected String getTrustStore()

getDefaultTrustStore

protected File getDefaultTrustStore()

execute

public void execute()
             throws BuildException
Overrides:
execute in class Task
Throws:
BuildException