Révision bf9c3717
Ajouté par Remy Menard il y a environ 11 ans
DSeTa/DSeTa-Client/src/main/java/fr/unicaen/iota/dseta/client/DSeTaClient.java | ||
---|---|---|
import java.net.URL;
|
||
import java.security.KeyStore;
|
||
import java.security.SecureRandom;
|
||
import java.security.cert.CertificateException;
|
||
import java.security.cert.X509Certificate;
|
||
import java.util.*;
|
||
import javax.net.ssl.KeyManagerFactory;
|
||
import javax.net.ssl.TrustManagerFactory;
|
||
import javax.net.ssl.X509TrustManager;
|
||
import javax.xml.datatype.DatatypeConfigurationException;
|
||
import javax.xml.datatype.DatatypeFactory;
|
||
import javax.xml.datatype.XMLGregorianCalendar;
|
||
... | ... | |
/**
|
||
*
|
||
*/
|
||
public class DSeTaClient implements X509TrustManager {
|
||
public class DSeTaClient {
|
||
|
||
private Identity identity;
|
||
private IDedDSServicePortType port;
|
||
... | ... | |
}
|
||
|
||
public void configureService(String address, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword) throws Exception {
|
||
System.setProperty("javax.net.ssl.keyStore", pksFilename);
|
||
System.setProperty("javax.net.ssl.keyStorePassword", pksPassword);
|
||
System.setProperty("javax.net.ssl.trustStore", trustPksFilename);
|
||
System.setProperty("javax.net.ssl.trustStorePassword", trustPksPassword);
|
||
if (pksFilename != null && pksPassword != null && trustPksFilename != null && trustPksPassword != null) {
|
||
System.setProperty("javax.net.ssl.keyStore", pksFilename);
|
||
System.setProperty("javax.net.ssl.keyStorePassword", pksPassword);
|
||
System.setProperty("javax.net.ssl.trustStore", trustPksFilename);
|
||
System.setProperty("javax.net.ssl.trustStorePassword", trustPksPassword);
|
||
}
|
||
URL wsdlUrl = new URL(address + "?wsdl");
|
||
IDedDSService service = new IDedDSService(wsdlUrl);
|
||
port = service.getPort(IDedDSServicePortType.class);
|
||
... | ... | |
return serviceIds;
|
||
}
|
||
|
||
@Override
|
||
public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException {
|
||
throw new UnsupportedOperationException("Not supported yet.");
|
||
}
|
||
|
||
@Override
|
||
public void checkServerTrusted(X509Certificate[] xcs, String string) throws CertificateException {
|
||
throw new UnsupportedOperationException("Not supported yet.");
|
||
}
|
||
|
||
@Override
|
||
public X509Certificate[] getAcceptedIssuers() {
|
||
throw new UnsupportedOperationException("Not supported yet.");
|
||
}
|
||
}
|
Formats disponibles : Unified diff
Version 1.99
- a few bugs fixed!
- new testing application to capture events
- new options to the command line to configure the public/private keys
for TLS and for signature
- new method more accurate than "traceEPC": the events are sorted by
EPCIS
- New options added to the command line
- user can be identified by alias, if the DN of his certificate is
incompatible with the LDAP directory
- new shell script to configure the LDAP directory (same
functionnalities as IoTa-Installer)
- installs and configures LaMBDa
- finer certificate mangagement
- EpcILoN correctly subscribe with TLS to ETa
- new figure for LaMBDa
- shows data flows between PHI and YPSilon
- sets DS and DSeTa in different schemas