src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/AuthTimeWithHash.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2018, 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. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.security.krb5.internal.rcache; |
26 package sun.security.krb5.internal.rcache; |
27 |
27 |
28 import sun.security.action.GetPropertyAction; |
28 import sun.security.action.GetBooleanAction; |
29 |
29 |
30 import java.util.Objects; |
30 import java.util.Objects; |
31 |
31 |
32 /** |
32 /** |
33 * The class represents a new style replay cache entry. It can be either used |
33 * The class represents a new style replay cache entry. It can be either used |
38 |
38 |
39 // The hash algorithm can be "HASH" or "SHA256". |
39 // The hash algorithm can be "HASH" or "SHA256". |
40 public static final String DEFAULT_HASH_ALG; |
40 public static final String DEFAULT_HASH_ALG; |
41 |
41 |
42 static { |
42 static { |
43 if (GetPropertyAction.privilegedGetProperty( |
43 if (GetBooleanAction.privilegedGetProperty("jdk.krb5.rcache.useMD5")) { |
44 "jdk.krb5.rcache.useMD5", "false").equals("true")) { |
|
45 DEFAULT_HASH_ALG = "HASH"; |
44 DEFAULT_HASH_ALG = "HASH"; |
46 } else { |
45 } else { |
47 DEFAULT_HASH_ALG = "SHA256"; |
46 DEFAULT_HASH_ALG = "SHA256"; |
48 } |
47 } |
49 } |
48 } |