Project

General

Profile

« Previous | Next » 

Revision 7752

switch back to log4j statements now that I am sure certificate delegation is working.

View differences:

src/edu/ucsb/nceas/metacat/restservice/D1ResourceHandler.java
137 137
  
138 138
        	// check for session-based certificate from the portal
139 139
        	String configurationFileName = servletContext.getInitParameter("oa4mp:client.config.file");
140
        	//String configurationFilePath = servletContext.getResource(configurationFileName).getPath();
141 140
        	String configurationFilePath = servletContext.getRealPath(configurationFileName);
142

  
143 141
        	PortalCertificateManager portalManager = new PortalCertificateManager(configurationFilePath);
144
        	System.out.println("Initialized the PortalCertificateManager using config file: " + configurationFilePath);
142
        	logMetacat.debug("Initialized the PortalCertificateManager using config file: " + configurationFilePath);
145 143
        	X509Certificate certificate = portalManager.getCertificate(request);
146
        	System.out.println("Retrieved certificate: " + certificate);
144
        	logMetacat.debug("Retrieved certificate: " + certificate);
147 145
	    	PrivateKey key = portalManager.getPrivateKey(request);
148
	    	System.out.println("Retrieved key: " + key);
146
	    	logMetacat.debug("Retrieved key: " + key);
149 147
	    	if (certificate != null && key != null) {
150 148
	        	request.setAttribute("javax.servlet.request.X509Certificate", certificate);
151
	        	System.out.println("Added certificate to the request: " + certificate.toString());
149
	        	logMetacat.debug("Added certificate to the request: " + certificate.toString());
152 150
	    	}
153 151
	    	
154 152
            // load session from certificate in request

Also available in: Unified diff