9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5032952
27 * @summary non-transient non-serializable instance field in
28 serializable class
29 */
30
31 import sun.security.provider.certpath.SunCertPathBuilderException;
32 import java.io.*;
33 import java.security.cert.*;
34 import java.security.*;
35 import java.util.Collections;
36
37 public class SunCertPathBuilderExceptionTest {
38
39 public static void main(String[] args) throws Exception {
40 try {
41 CertPathBuilder cpb = CertPathBuilder.
42 getInstance(CertPathBuilder.getDefaultType());
43 CertificateFactory cf = CertificateFactory.getInstance("X.509");
44 File f = new File
45 (System.getProperty("test.src", "."), "speech2speech");
46 X509Certificate cert = (X509Certificate)
47 cf.generateCertificate(new FileInputStream(f));
48 TrustAnchor anchor = new TrustAnchor(cert, null);
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5032952
27 * @summary non-transient non-serializable instance field in
28 serializable class
29 * @modules java.base/sun.security.provider.certpath
30 */
31
32 import sun.security.provider.certpath.SunCertPathBuilderException;
33 import java.io.*;
34 import java.security.cert.*;
35 import java.security.*;
36 import java.util.Collections;
37
38 public class SunCertPathBuilderExceptionTest {
39
40 public static void main(String[] args) throws Exception {
41 try {
42 CertPathBuilder cpb = CertPathBuilder.
43 getInstance(CertPathBuilder.getDefaultType());
44 CertificateFactory cf = CertificateFactory.getInstance("X.509");
45 File f = new File
46 (System.getProperty("test.src", "."), "speech2speech");
47 X509Certificate cert = (X509Certificate)
48 cf.generateCertificate(new FileInputStream(f));
49 TrustAnchor anchor = new TrustAnchor(cert, null);
|