--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReq.java Thu Jun 06 10:03:22 2019 -0400
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReq.java Wed Jun 05 01:42:11 2019 -0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, 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
@@ -36,6 +36,7 @@
import sun.security.krb5.internal.crypto.KeyUsage;
import java.io.IOException;
import java.time.Instant;
+import java.util.Arrays;
/**
* This class encapsulates the KRB-AS-REQ message that the client
@@ -58,7 +59,8 @@
KerberosTime till, // ok, will use
KerberosTime rtime, // ok
int[] eTypes, // NO
- HostAddresses addresses // ok
+ HostAddresses addresses, // ok
+ PAData[] extraPAs // ok
)
throws KrbException, IOException {
@@ -93,6 +95,15 @@
paData[0] = new PAData( Krb5.PA_ENC_TIMESTAMP,
encTs.asn1Encode());
}
+ if (extraPAs != null && extraPAs.length > 0) {
+ if (paData == null) {
+ paData = new PAData[extraPAs.length];
+ } else {
+ paData = Arrays.copyOf(paData, paData.length + extraPAs.length);
+ }
+ System.arraycopy(extraPAs, 0, paData,
+ paData.length - extraPAs.length, extraPAs.length);
+ }
if (cname.getRealm() == null) {
throw new RealmException(Krb5.REALM_NULL,