提交 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 {
st.wordChars('{', '{'); // need {} for property subst
st.wordChars('}', '}');
st.wordChars('*', '*');
st.wordChars('+', '+');
st.wordChars('~', '~');
// 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.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -22,8 +22,8 @@
*/
/**
* @test
* @bug 6581254
* @summary Allow "~" in config to support windows short path
* @bug 6581254 6986789
* @summary Allow '~' and '+' in config file
* @author Valerie Peng
*/
......@@ -32,17 +32,21 @@ import java.io.*;
public class ConfigShortPath {
private static final String[] configNames = { "csp.cfg", "cspPlus.cfg" };
public static void main(String[] args) {
String testSrc = System.getProperty("test.src", ".");
String configFile = testSrc + File.separator + "csp.cfg";
System.out.println("Testing against " + configFile);
try {
Provider p = new sun.security.pkcs11.SunPKCS11(configFile);
} catch (ProviderException pe) {
String cause = pe.getCause().getMessage();
if (cause.indexOf("Unexpected token") != -1) {
// re-throw to indicate test failure
throw pe;
for (int i = 0; i < configNames.length; i++) {
String configFile = testSrc + File.separator + configNames[i];
System.out.println("Testing against " + configFile);
try {
Provider p = new sun.security.pkcs11.SunPKCS11(configFile);
} catch (ProviderException pe) {
String cause = pe.getCause().getMessage();
if (cause.indexOf("Unexpected token") != -1) {
// 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.
先完成此消息的编辑!
想要评论请 注册