Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42285C59F for ; Wed, 17 Jul 2013 10:52:06 +0000 (UTC) Received: (qmail 53869 invoked by uid 500); 17 Jul 2013 10:52:02 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 53808 invoked by uid 500); 17 Jul 2013 10:51:57 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 53799 invoked by uid 99); 17 Jul 2013 10:51:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 10:51:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 10:51:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 607E42388980; Wed, 17 Jul 2013 10:51:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1504072 - in /cxf/trunk: services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/ systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/ systests/ws-security/src/test/resources/certs/xkms/trusted_cas/ Date: Wed, 17 Jul 2013 10:51:33 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130717105133.607E42388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Wed Jul 17 10:51:32 2013 New Revision: 1504072 URL: http://svn.apache.org/r1504072 Log: Re-enabling Asymmetric XKMS test Added: cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/ cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/cxfca.crt Modified: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/XkmsCryptoProvider.java cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java Modified: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/XkmsCryptoProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/XkmsCryptoProvider.java?rev=1504072&r1=1504071&r2=1504072&view=diff ============================================================================== --- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/XkmsCryptoProvider.java (original) +++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/crypto/XkmsCryptoProvider.java Wed Jul 17 10:51:32 2013 @@ -96,18 +96,19 @@ public class XkmsCryptoProvider extends } @Override - public boolean verifyTrust(X509Certificate[] certs, boolean enableRevocation) + public void verifyTrust(X509Certificate[] certs, boolean enableRevocation) throws WSSecurityException { - if (certs == null) { - return false; + if (certs != null) { + LOG.fine(String.format("Verifying certificate id: %s", certs[0].getSubjectDN())); + } + if (certs == null || !xkmsInvoker.validateCertificate(certs[0])) { + throw new CryptoProviderException("The given certificate is not valid"); } - LOG.fine(String.format("Verifying certificate id: %s", certs[0].getSubjectDN())); - return xkmsInvoker.validateCertificate(certs[0]); } @Override - public boolean verifyTrust(PublicKey publicKey) throws WSSecurityException { - return false; + public void verifyTrust(PublicKey publicKey) throws WSSecurityException { + throw new CryptoProviderException("PublicKeys cannot be verified"); } private void assertDefaultCryptoProvider() { Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java?rev=1504072&r1=1504071&r2=1504072&view=diff ============================================================================== --- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java (original) +++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java Wed Jul 17 10:51:32 2013 @@ -94,10 +94,10 @@ public class XKMSTest extends AbstractBu bus.shutdown(true); } - // TODO The client uses XKMS to locate the public key of the service with which to encrypt - // the message. + // The client uses XKMS to locate the public key of the service with which to encrypt + // the message. Then the client uses XKMS to both locate + validate the signing cert + // on processing the service response @org.junit.Test - @org.junit.Ignore public void testAsymmetricBinding() throws Exception { SpringBusFactory bf = new SpringBusFactory(); Added: cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/cxfca.crt URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/cxfca.crt?rev=1504072&view=auto ============================================================================== Files cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/cxfca.crt (added) and cxf/trunk/systests/ws-security/src/test/resources/certs/xkms/trusted_cas/cxfca.crt Wed Jul 17 10:51:32 2013 differ