Révision 19b58bab
Ajouté par Remy Menard il y a plus de 11 ans
CaPPa/EPCIS-Xi-Client/src/main/java/fr/unicaen/iota/xi/client/PEP.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
|
||
... | ... | |
|
||
public class PEP {
|
||
|
||
private String url;
|
||
|
||
private final String url;
|
||
private final String pksFilename;
|
||
private final String pksPassword;
|
||
private final String trustPksFilename;
|
||
private final String trustPksPassword;
|
||
private static final Log log = LogFactory.getLog(PEP.class);
|
||
|
||
public PEP(String url) {
|
||
public PEP(String url, String pksFilename, String pksPassword, String trustPksFilename, String trustPksPassword) {
|
||
this.url = url;
|
||
this.pksFilename = pksFilename;
|
||
this.pksPassword = pksPassword;
|
||
this.trustPksFilename = trustPksFilename;
|
||
this.trustPksPassword = trustPksPassword;
|
||
}
|
||
|
||
/**
|
||
... | ... | |
* @throws IOException If an error occurred connecting to the XACML module.
|
||
*/
|
||
private HttpURLConnection getConnection(final String contentType, String url) throws IOException {
|
||
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 serviceUrl = new URL(url);
|
||
HttpURLConnection connection = (HttpURLConnection) serviceUrl.openConnection();
|
||
connection.setRequestProperty("content-type", contentType);
|
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)