aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/sun/security/krb5/Credentials.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/sun/security/krb5/Credentials.java')
-rw-r--r--src/share/classes/sun/security/krb5/Credentials.java36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/share/classes/sun/security/krb5/Credentials.java b/src/share/classes/sun/security/krb5/Credentials.java
index 80095ac94d..3fe2953071 100644
--- a/src/share/classes/sun/security/krb5/Credentials.java
+++ b/src/share/classes/sun/security/krb5/Credentials.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, 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
@@ -56,13 +56,23 @@ public class Credentials {
KerberosTime endTime;
KerberosTime renewTill;
HostAddresses cAddr;
- EncryptionKey serviceKey;
AuthorizationData authzData;
private static boolean DEBUG = Krb5.DEBUG;
private static CredentialsCache cache;
static boolean alreadyLoaded = false;
private static boolean alreadyTried = false;
+ private Credentials proxy = null;
+
+ public Credentials getProxy() {
+ return proxy;
+ }
+
+ public Credentials setProxy(Credentials proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
// Read native ticket with session key type in the given list
private static native Credentials acquireDefaultNativeCreds(int[] eTypes);
@@ -336,20 +346,19 @@ public class Credentials {
return null;
}
- sun.security.krb5.internal.ccache.Credentials tgtCred =
- ccache.getDefaultCreds();
+ Credentials tgtCred = ccache.getInitialCreds();
if (tgtCred == null) {
return null;
}
- if (EType.isSupported(tgtCred.getEType())) {
- return tgtCred.setKrbCreds();
+ if (EType.isSupported(tgtCred.key.getEType())) {
+ return tgtCred;
} else {
if (DEBUG) {
System.out.println(
">>> unsupported key type found the default TGT: " +
- tgtCred.getEType());
+ tgtCred.key.getEType());
}
return null;
}
@@ -384,20 +393,19 @@ public class Credentials {
cache = CredentialsCache.getInstance();
}
if (cache != null) {
- sun.security.krb5.internal.ccache.Credentials temp =
- cache.getDefaultCreds();
+ Credentials temp = cache.getInitialCreds();
if (temp != null) {
if (DEBUG) {
System.out.println(">>> KrbCreds found the default ticket"
+ " granting ticket in credential cache.");
}
- if (EType.isSupported(temp.getEType())) {
- result = temp.setKrbCreds();
+ if (EType.isSupported(temp.key.getEType())) {
+ result = temp;
} else {
if (DEBUG) {
System.out.println(
">>> unsupported key type found the default TGT: " +
- temp.getEType());
+ temp.key.getEType());
}
}
}
@@ -474,10 +482,6 @@ public class Credentials {
return cache;
}
- public EncryptionKey getServiceKey() {
- return serviceKey;
- }
-
/*
* Prints out debug info.
*/