2362N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2307N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2307N/A * This code is free software; you can redistribute it and/or modify it 2307N/A * under the terms of the GNU General Public License version 2 only, as 2307N/A * published by the Free Software Foundation. 2307N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2307N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2307N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2307N/A * version 2 for more details (a copy is included in the LICENSE file that 2307N/A * You should have received a copy of the GNU General Public License version 2307N/A * 2 along with this work; if not, write to the Free Software Foundation, 2307N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 2307N/A * @param input The data to sign 2307N/A * @param path different cases to simulate, impl on URL path 2307N/A * 3: Bad digets octets in messageImprint 2307N/A * 4: Different algorithmId in messageImprint 2307N/A * 5: whole chain in cert set 2307N/A * 7: extension is non-critical 2307N/A * 8: extension does not have timestamping 2307N/A if (
path ==
5) {
// Only case 5 uses full chain 2307N/A "1.2.840.113549.1.9.16.1.4"),
2307N/A // Use -J-Djava.security.egd=file:/dev/./urandom to speed up 2307N/A // nonce generation in timestamping request. Not avaibale on 2307N/A // Windows and defaults to thread seed generator, not too bad. 2307N/A " -J-Djava.security.egd=file:/dev/./urandom" +
2307N/A " -debug -keystore " +
TSKS +
" -storepass changeit" +
2307N/A " -J-Djava.security.egd=file:/dev/./urandom" +
2307N/A " -debug -keystore " +
TSKS +
" -storepass changeit" +
2307N/A }
else {
// Run as a standalone server 2307N/A * @param cmd the command line (with a hole to plug in) 2307N/A * @param expected if this command should succeed