jdk/test/javax/xml/crypto/dsig/GenerationTests.java
changeset 1337 e8d6cef36199
parent 2 90ce3da70b43
child 1639 a97859015238
equal deleted inserted replaced
1334:21b652819b97 1337:e8d6cef36199
    90     private static Key signingKey;
    90     private static Key signingKey;
    91     private static PublicKey validatingKey;
    91     private static PublicKey validatingKey;
    92     private static Certificate signingCert;
    92     private static Certificate signingCert;
    93     private static KeyStore ks;
    93     private static KeyStore ks;
    94     private final static String DIR = System.getProperty("test.src", ".");
    94     private final static String DIR = System.getProperty("test.src", ".");
       
    95 //    private final static String DIR = ".";
    95     private final static String DATA_DIR =
    96     private final static String DATA_DIR =
    96         DIR + System.getProperty("file.separator") + "data";
    97         DIR + System.getProperty("file.separator") + "data";
    97     private final static String KEYSTORE =
    98     private final static String KEYSTORE =
    98         DATA_DIR + System.getProperty("file.separator") + "certs" +
    99         DATA_DIR + System.getProperty("file.separator") + "certs" +
    99         System.getProperty("file.separator") + "test.jks";
   100         System.getProperty("file.separator") + "test.jks";
   200         doc.appendChild(envelope);
   201         doc.appendChild(envelope);
   201 
   202 
   202         DOMSignContext dsc = new DOMSignContext(signingKey, envelope);
   203         DOMSignContext dsc = new DOMSignContext(signingKey, envelope);
   203 
   204 
   204         sig.sign(dsc);
   205         sig.sign(dsc);
       
   206 //      StringWriter sw = new StringWriter();
       
   207 //      dumpDocument(doc, sw);
       
   208 //      System.out.println(sw.toString());
   205 
   209 
   206         DOMValidateContext dvc = new DOMValidateContext
   210         DOMValidateContext dvc = new DOMValidateContext
   207             (kvks, envelope.getFirstChild());
   211             (kvks, envelope.getFirstChild());
   208         XMLSignature sig2 = fac.unmarshalXMLSignature(dvc);
   212         XMLSignature sig2 = fac.unmarshalXMLSignature(dvc);
   209 
   213