abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r560500 - /incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java
Date Sat, 28 Jul 2007 05:16:49 GMT
Author: jmsnell
Date: Fri Jul 27 22:16:48 2007
New Revision: 560500

URL: http://svn.apache.org/viewvc?view=rev&rev=560500
Log:
Disable the third party verification test

Modified:
    incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java

Modified: incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java?view=diff&rev=560500&r1=560499&r2=560500
==============================================================================
--- incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java
(original)
+++ incubator/abdera/java/trunk/security/src/test/java/org/apache/abdera/test/security/DSigThirdPartyVerifyTest.java
Fri Jul 27 22:16:48 2007
@@ -51,67 +51,69 @@
   
   public static void testThirdPartyVerification() throws Exception {
       
-    // Initialize the keystore
-    KeyStore ks = KeyStore.getInstance(keystoreType);
-    assertNotNull(ks);
+// The third party service does not appear to be functioning any more
     
-    InputStream in = DigitalSignatureTest.class.getResourceAsStream(keystoreFile);
-    assertNotNull(in);
-    
-    ks.load(in, keystorePass.toCharArray());
-    PrivateKey signingKey = 
-      (PrivateKey) ks.getKey(
-        privateKeyAlias,
-        privateKeyPass.toCharArray());
-    X509Certificate cert = 
-      (X509Certificate) ks.getCertificate(
-        certificateAlias);
-    assertNotNull(signingKey);
-    assertNotNull(cert);
-    
-    // Create the entry to sign
-    Abdera abdera = new Abdera();
-    AbderaSecurity absec = new AbderaSecurity(abdera);
-    Factory factory = abdera.getFactory();
-    
-    Entry entry = factory.newEntry();
-    entry.setId("http://example.org/foo/entry");  
-    entry.setUpdated(new java.util.Date());
-    entry.setTitle("This is an entry");
-    entry.setContentAsXhtml("This <b>is</b> <i>markup</i>");
-    entry.addAuthor("James");
-    entry.addLink("http://www.example.org");
-    
-    // Prepare the digital signature options
-    Signature sig = absec.getSignature();
-    SignatureOptions options = sig.getDefaultSignatureOptions();    
-    options.setCertificate(cert);
-    options.setSigningKey(signingKey);
-
-    // Sign the entry
-    entry = sig.sign(entry, options);
-    assertNotNull(
-      entry.getFirstChild(
-        new QName(
-          "http://www.w3.org/2000/09/xmldsig#", 
-          "Signature")));
-
-    // Verify the signature with Verisign's "Signed Ping" interop endpoint
-    AbderaClient abderaClient = new AbderaClient();
-    RequestOptions reqoptions = abderaClient.getDefaultRequestOptions();
-    reqoptions.setContentType("application/xml");
-    BaseRequestEntity bre = new BaseRequestEntity(entry,false);
-    ClientResponse response = abderaClient.post(
-      "http://verisignlabs.com/tg/verify", 
-      bre, reqoptions);
-    assertEquals(200, response.getStatus());
-    Document<Element> result = response.getDocument();
-    
-    XPath xpath = abdera.getXPath();
-    assertTrue(
-      xpath.booleanValueOf(
-        "/Result/SignatureVerifies[text()='true']", 
-        result));
+//    // Initialize the keystore
+//    KeyStore ks = KeyStore.getInstance(keystoreType);
+//    assertNotNull(ks);
+//    
+//    InputStream in = DigitalSignatureTest.class.getResourceAsStream(keystoreFile);
+//    assertNotNull(in);
+//    
+//    ks.load(in, keystorePass.toCharArray());
+//    PrivateKey signingKey = 
+//      (PrivateKey) ks.getKey(
+//        privateKeyAlias,
+//        privateKeyPass.toCharArray());
+//    X509Certificate cert = 
+//      (X509Certificate) ks.getCertificate(
+//        certificateAlias);
+//    assertNotNull(signingKey);
+//    assertNotNull(cert);
+//    
+//    // Create the entry to sign
+//    Abdera abdera = new Abdera();
+//    AbderaSecurity absec = new AbderaSecurity(abdera);
+//    Factory factory = abdera.getFactory();
+//    
+//    Entry entry = factory.newEntry();
+//    entry.setId("http://example.org/foo/entry");  
+//    entry.setUpdated(new java.util.Date());
+//    entry.setTitle("This is an entry");
+//    entry.setContentAsXhtml("This <b>is</b> <i>markup</i>");
+//    entry.addAuthor("James");
+//    entry.addLink("http://www.example.org");
+//    
+//    // Prepare the digital signature options
+//    Signature sig = absec.getSignature();
+//    SignatureOptions options = sig.getDefaultSignatureOptions();    
+//    options.setCertificate(cert);
+//    options.setSigningKey(signingKey);
+//
+//    // Sign the entry
+//    entry = sig.sign(entry, options);
+//    assertNotNull(
+//      entry.getFirstChild(
+//        new QName(
+//          "http://www.w3.org/2000/09/xmldsig#", 
+//          "Signature")));
+//
+//    // Verify the signature with Verisign's "Signed Ping" interop endpoint
+//    AbderaClient abderaClient = new AbderaClient();
+//    RequestOptions reqoptions = abderaClient.getDefaultRequestOptions();
+//    reqoptions.setContentType("application/xml");
+//    BaseRequestEntity bre = new BaseRequestEntity(entry,false);
+//    ClientResponse response = abderaClient.post(
+//      "http://verisignlabs.com/tg/verify", 
+//      bre, reqoptions);
+//    assertEquals(200, response.getStatus());
+//    Document<Element> result = response.getDocument();
+//    
+//    XPath xpath = abdera.getXPath();
+//    assertTrue(
+//      xpath.booleanValueOf(
+//        "/Result/SignatureVerifies[text()='true']", 
+//        result));
 
   }
   



Mime
View raw message