提交 733e5e7a 编写于 作者: V valeriep

6986789: Sun pkcs11 provider fails to parse path name containing "+"

Summary: Modified to accept '+' as valid character.
Reviewed-by: weijun
上级 7607e559
...@@ -343,6 +343,7 @@ final class Config { ...@@ -343,6 +343,7 @@ final class Config {
st.wordChars('{', '{'); // need {} for property subst st.wordChars('{', '{'); // need {} for property subst
st.wordChars('}', '}'); st.wordChars('}', '}');
st.wordChars('*', '*'); st.wordChars('*', '*');
st.wordChars('+', '+');
st.wordChars('~', '~'); st.wordChars('~', '~');
// XXX check ASCII table and add all other characters except special // XXX check ASCII table and add all other characters except special
......
/* /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
*/ */
/** /**
* @test * @test
* @bug 6581254 * @bug 6581254 6986789
* @summary Allow "~" in config to support windows short path * @summary Allow '~' and '+' in config file
* @author Valerie Peng * @author Valerie Peng
*/ */
...@@ -32,17 +32,21 @@ import java.io.*; ...@@ -32,17 +32,21 @@ import java.io.*;
public class ConfigShortPath { public class ConfigShortPath {
private static final String[] configNames = { "csp.cfg", "cspPlus.cfg" };
public static void main(String[] args) { public static void main(String[] args) {
String testSrc = System.getProperty("test.src", "."); String testSrc = System.getProperty("test.src", ".");
String configFile = testSrc + File.separator + "csp.cfg"; for (int i = 0; i < configNames.length; i++) {
System.out.println("Testing against " + configFile); String configFile = testSrc + File.separator + configNames[i];
try { System.out.println("Testing against " + configFile);
Provider p = new sun.security.pkcs11.SunPKCS11(configFile); try {
} catch (ProviderException pe) { Provider p = new sun.security.pkcs11.SunPKCS11(configFile);
String cause = pe.getCause().getMessage(); } catch (ProviderException pe) {
if (cause.indexOf("Unexpected token") != -1) { String cause = pe.getCause().getMessage();
// re-throw to indicate test failure if (cause.indexOf("Unexpected token") != -1) {
throw pe; // re-throw to indicate test failure
throw pe;
}
} }
} }
} }
......
showInfo = false
name = NSS
nssSecmodDirectory = /export/local/38289.JDK7.PIT.JSN-TL+7-b112_pit_security_oel5.5-x64-32/results/ResultDir/KeytoolNSS/db
nssLibraryDirectory = /export/local/common/testbase/7/security/tools/lib/nss/Linux2.6
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册