Ignore:
Timestamp:
Mar 31, 2011 10:07:29 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
9f8dbc1
Parents:
56baf92
Message:

Create works!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • axis/FeddCommand.java

    r56baf92 r10f5e84  
    11import edu.isi.www.fedd_types.*;
    22import edu.isi.www.fedd_wsdl.*;
    3 import java.net.URL;
     3import java.net.*;
     4import java.util.*;
     5
    46import net.deterlab.isi.XTrustProvider;
    57import net.deterlab.isi.Fedid;
    68
    7 class FeddCommand {
     9import javax.net.ssl.*;
     10
     11public class FeddCommand {
     12
     13    static { setUpSecurity(); }
    814
    915    static class ExperimentLabels {
     
    4349        System.setProperty("javax.net.ssl.keyStore", keyStore);
    4450        System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
     51
     52    }
     53
     54    static public void clearSSLSessionCache() {
     55        try {
     56            SSLContext sctxt = SSLContext.getDefault();
     57            SSLSessionContext ssctxt = sctxt.getClientSessionContext();
     58            Enumeration<byte[]> e = ssctxt.getIds();
     59            while (e.hasMoreElements()) {
     60                SSLSession s = ssctxt.getSession(e.nextElement());
     61                s.invalidate();
     62                System.err.println("invalidated " + s);
     63            }
     64        }
     65        catch (Exception e) { System.err.println(e); }
    4566    }
    4667
     
    5071         * Boilerplate web services access stuff.
    5172         */
     73        clearSSLSessionCache();
    5274        FeddServiceLocator service = new FeddServiceLocator();
    5375        FeddPortType port = service.getfeddPort(new URL(server));
Note: See TracChangeset for help on using the changeset viewer.