@Test public void evaluateNoClientCertException() { MuleMessage muleMessge = mock(MuleMessage.class); try { evaluator.evaluate(X509CertificateEvaluator.EXPR_SENDERID, muleMessge); fail(); } catch(Exception e) { assertEquals("No certificate chain found from client", e.getCause().getMessage()); } }
public Object evaluate(String expression, MuleMessage message) { try { String value = null; if (EXPR_SENDERID.equals(expression)) { value = getSenderIdFromCertificate(message, "PEER_CERTIFICATES"); if (log.isDebugEnabled()) { String me = getSenderIdFromCertificate(message, "LOCAL_CERTIFICATES"); log.debug("{} validates sender id: {}", me, value); } } return value; } catch (Exception e) { log.error(e.getMessage()); throw new RuntimeException(e); } }
X509CertificateEvaluator implements ExpressionEvaluator { public Object evaluate(String expression, MuleMessage message) { try { String value = null; if (EXPR_SENDERID.equals(expression)) { value = getSenderIdFromCertificate(message, "PEER_CERTIFICATES"); if (log.isDebugEnabled()) { String me = getSenderIdFromCertificate(message, "LOCAL_CERTIFICATES"); log.debug("{} validates sender id: {}", me, value); } } return value; } catch (Exception e) { log.error(e.getMessage()); throw new RuntimeException(e); } } }
X509CertificateEvaluator implements ExpressionEvaluator { public Object evaluate(String expression, MuleMessage message) { try { String value = null; if (EXPR_SENDERID.equals(expression)) { value = getSenderIdFromCertificate(message, "PEER_CERTIFICATES"); if (log.isDebugEnabled()) { String me = getSenderIdFromCertificate(message, "LOCAL_CERTIFICATES"); log.debug("{} validates sender id: {}", me, value); } } return value; } catch (Exception e) { log.error(e.getMessage()); throw new RuntimeException(e); } }  }
X509CertificateEvaluator implements ExpressionEvaluator { public Object evaluate(String expression, MuleMessage message) { try { String value = null; if (EXPR_SENDERID.equals(expression)) { value = getSenderIdFromCertificate(message, "PEER_CERTIFICATES"); if (log.isDebugEnabled()) { String me = getSenderIdFromCertificate(message, "LOCAL_CERTIFICATES"); log.debug("{} validates sender id: {}", me, value); } } return value; } catch (Exception e) { log.error(e.getMessage()); throw new RuntimeException(e); } }  String getName(); void setPropertyName(String propertyName); void setName(String name); Object evaluate(String expression, MuleMessage message); }
X509CertificateEvaluator implements ExpressionEvaluator { public Object evaluate(String expression, MuleMessage message) { try { String value = null; if (EXPR_SENDERID.equals(expression)) { value = getSenderIdFromCertificate(message, "PEER_CERTIFICATES"); if (log.isDebugEnabled()) { String me = getSenderIdFromCertificate(message, "LOCAL_CERTIFICATES"); log.debug("{} validates sender id: {}", me, value); } } return value; } catch (Exception e) { log.error(e.getMessage()); throw new RuntimeException(e); } }  String getName(); void setPropertyName(String propertyName); void setName(String name); Object evaluate(String expression, MuleMessage message); static final String NAME; static final String EXPR_SENDERID; }