00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 package org.objectweb.proactive.ext.security.domain;
00032
00033 import java.io.IOException;
00034 import java.security.PublicKey;
00035 import java.security.cert.X509Certificate;
00036 import java.util.ArrayList;
00037
00038 import org.objectweb.proactive.ext.security.Communication;
00039 import org.objectweb.proactive.ext.security.PolicyServer;
00040 import org.objectweb.proactive.ext.security.ProActiveSecurityDescriptorHandler;
00041 import org.objectweb.proactive.ext.security.ProActiveSecurityManager;
00042 import org.objectweb.proactive.ext.security.SecurityContext;
00043 import org.objectweb.proactive.ext.security.crypto.KeyExchangeException;
00044 import org.objectweb.proactive.ext.security.exceptions.InvalidPolicyFile;
00045 import org.objectweb.proactive.ext.security.exceptions.RenegotiateSessionException;
00046 import org.objectweb.proactive.ext.security.exceptions.SecurityNotAvailableException;
00047 import org.objectweb.proactive.ext.security.securityentity.Entity;
00048
00049
00050 public class DomainImpl implements SecurityDomain {
00051 private PolicyServer policyServer;
00052
00053
00054 public DomainImpl() {
00055 }
00056 ;
00057
00058
00059 public DomainImpl(String securityFile) {
00060 try {
00061 this.policyServer = ProActiveSecurityDescriptorHandler.createPolicyServer(securityFile);
00062 } catch (InvalidPolicyFile e) {
00063 e.printStackTrace();
00064 }
00065 }
00066
00067 public SecurityContext getPolicy(SecurityContext securityContext) {
00068 try {
00069 return policyServer.getPolicy(securityContext);
00070 } catch (SecurityNotAvailableException e) {
00071 e.printStackTrace();
00072 }
00073 return null;
00074 }
00075
00076
00077
00078
00079 public byte[] getCertificateEncoded() throws SecurityNotAvailableException {
00080 return null;
00081 }
00082
00083
00084
00085
00086 public ArrayList<Entity> getEntities() throws SecurityNotAvailableException {
00087 return null;
00088 }
00089
00090
00091
00092
00093 public String getName() {
00094 return null;
00095 }
00096
00097 public void terminateSession(long sessionID)
00098 throws IOException, SecurityNotAvailableException {
00099 }
00100
00101 public X509Certificate getCertificate()
00102 throws SecurityNotAvailableException {
00103 return null;
00104 }
00105
00106 public ProActiveSecurityManager getProActiveSecurityManager() {
00107 return null;
00108 }
00109
00110 public long startNewSession(Communication policy)
00111 throws SecurityNotAvailableException, RenegotiateSessionException {
00112 return 0;
00113 }
00114
00115 public PublicKey getPublicKey() throws SecurityNotAvailableException {
00116 return null;
00117 }
00118
00119 public byte[] randomValue(long sessionID, byte[] clientRandomValue)
00120 throws SecurityNotAvailableException, RenegotiateSessionException {
00121 return null;
00122 }
00123
00124 public byte[][] publicKeyExchange(long sessionID, byte[] myPublicKey,
00125 byte[] myCertificate, byte[] signature)
00126 throws SecurityNotAvailableException, RenegotiateSessionException,
00127 KeyExchangeException {
00128 return null;
00129 }
00130
00131 public byte[][] secretKeyExchange(long sessionID, byte[] encodedAESKey,
00132 byte[] encodedIVParameters, byte[] encodedClientMacKey,
00133 byte[] encodedLockData, byte[] parametersSignature)
00134 throws SecurityNotAvailableException, RenegotiateSessionException {
00135 return null;
00136 }
00137
00138 public String getVNName() throws SecurityNotAvailableException {
00139 return null;
00140 }
00141 }