equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
26 * @bug 4856966 |
26 * @bug 4856966 |
27 * @summary |
27 * @summary |
28 * @author Andreas Sterbenz |
28 * @author Andreas Sterbenz |
29 * @library .. |
29 * @library .. |
30 * @key randomness |
30 * @key randomness |
|
31 * @run main/othervm ReinitDigest |
|
32 * @run main/othervm ReinitDigest sm |
31 */ |
33 */ |
32 |
34 |
33 import java.util.*; |
35 import java.security.MessageDigest; |
34 |
36 import java.security.Provider; |
35 import java.security.*; |
37 import java.util.Arrays; |
|
38 import java.util.Random; |
36 |
39 |
37 public class ReinitDigest extends PKCS11Test { |
40 public class ReinitDigest extends PKCS11Test { |
38 |
41 |
39 public static void main(String[] args) throws Exception { |
42 public static void main(String[] args) throws Exception { |
40 main(new ReinitDigest()); |
43 main(new ReinitDigest(), args); |
41 } |
44 } |
42 |
45 |
|
46 @Override |
43 public void main(Provider p) throws Exception { |
47 public void main(Provider p) throws Exception { |
44 if (p.getService("MessageDigest", "MD5") == null) { |
48 if (p.getService("MessageDigest", "MD5") == null) { |
45 System.out.println("Provider does not support MD5, skipping"); |
49 System.out.println("Provider does not support MD5, skipping"); |
46 return; |
50 return; |
47 } |
51 } |