Révision 19b58bab
Ajouté par Remy Menard il y a plus de 11 ans
ALfA/ALfA/src/main/java/fr/unicaen/iota/application/operations/EpcisRequest.java | ||
---|---|---|
/*
|
||
* This program is a part of the IoTa Project.
|
||
* This program is a part of the IoTa project.
|
||
*
|
||
* Copyright © 2008-2012 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2013 Université de Caen Basse-Normandie, GREYC
|
||
* Copyright © 2008-2012 Orange Labs
|
||
*
|
||
*
|
||
* This program is free software: you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License as published by
|
||
* the Free Software Foundation, either version 3 of the License, or
|
||
... | ... | |
private final String serviceAddress;
|
||
private final String epc;
|
||
private final Identity identity;
|
||
private final String pksFilename;
|
||
private final String pksPassword;
|
||
private final String trustPksFilename;
|
||
private final String trustPksPassword;
|
||
private final String sessionID;
|
||
private final CallbackClient client;
|
||
private static final boolean isDebug = true; // TODO: hard value
|
||
private static final Log log = LogFactory.getLog(EpcisRequest.class);
|
||
|
||
public EpcisRequest(String serviceAddress, String epc, Identity identity, String sessionID, CallbackClient client) {
|
||
public EpcisRequest(String serviceAddress, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword, String epc, Identity identity, String sessionID, CallbackClient client) {
|
||
this.identity = identity;
|
||
this.epc = epc;
|
||
this.sessionID = sessionID;
|
||
this.client = client;
|
||
this.serviceAddress = serviceAddress;
|
||
this.pksFilename = pksFilename;
|
||
this.pksPassword = pksPassword;
|
||
this.trustPksFilename = trustPksFilename;
|
||
this.trustPksPassword = trustPksPassword;
|
||
}
|
||
|
||
@Override
|
||
... | ... | |
debug.append("\n");
|
||
debug.append("Events: \n");
|
||
}
|
||
EpcisOperation epcisOperation = new EpcisOperation(identity, serviceAddress);
|
||
EpcisOperation epcisOperation = new EpcisOperation(identity, serviceAddress, pksFilename, pksPassword, trustPksFilename, trustPksPassword);
|
||
Collection<EPCISEventType> evts = epcisOperation.getEventFromEPC(epc);
|
||
for (EPCISEventType evt : evts) {
|
||
try {
|
||
... | ... | |
AggregationEventType event = (AggregationEventType) o;
|
||
for (EPC childEpc : event.getChildEPCs().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
new TraceEPCAsync(childEpc.getValue(), sessionID, client, identity).start();
|
||
new TraceEPCAsync(childEpc.getValue(), sessionID, client, identity, pksFilename, pksPassword, trustPksFilename, trustPksPassword).start();
|
||
}
|
||
} else if (o instanceof TransactionEventType) {
|
||
TransactionEventType event = (TransactionEventType) o;
|
||
for (EPC childEpc : event.getEpcList().getEpc()) {
|
||
log.trace("new traceEPC: " + childEpc.getValue());
|
||
new TraceEPCAsync(childEpc.getValue(), sessionID, client, identity).start();
|
||
new TraceEPCAsync(childEpc.getValue(), sessionID, client, identity, pksFilename, pksPassword, trustPksFilename, trustPksPassword).start();
|
||
}
|
||
}
|
||
}
|
Formats disponibles : Unified diff
Version 1.9
- use TLS for secured links
- SigMa is now fully functionnal
- completed documention
- a lot of bugs fixed!
- signature creation from the canonical form of the event
- signature creation using ECDSA algorithm
- signature is correctly verified
- manage the extension identifying the owner of the event
- if no identity is provided, the identity of the certificate is used
- access to the web interface of policy management is made by
certificate
- if no identity is provided, the identity of the certificate is used
- create and use certificates for TLS
- configure Apache Tomcat for TLS
- show SigMa library (SigMa-Commons)