[VOL-5486] Upgrade library versions
Change-Id: I8b4e88699e03f44ee13e467867f45ae3f0a63c4b
Signed-off-by: Abhay Kumar <abhay.kumar@radisys.com>
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go b/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
index e4571ce..fd01342 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/TGSExchange.go
@@ -89,7 +89,12 @@
return tkt, skey, nil
}
princ := types.NewPrincipalName(nametype.KRB_NT_PRINCIPAL, spn)
- realm := cl.Config.ResolveRealm(princ.NameString[len(princ.NameString)-1])
+ realm := cl.spnRealm(princ)
+
+ // if we don't know the SPN's realm, ask the client realm's KDC
+ if realm == "" {
+ realm = cl.Credentials.Realm()
+ }
tgt, skey, err := cl.sessionTGT(realm)
if err != nil {
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/network.go b/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
index 634f015..688ad3a 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/network.go
@@ -2,7 +2,6 @@
import (
"encoding/binary"
- "errors"
"fmt"
"io"
"net"
@@ -173,7 +172,7 @@
}
return rb, nil
}
- return nil, errors.New("error in getting a TCP connection to any of the KDCs")
+ return nil, fmt.Errorf("error sending to a KDC: %s", strings.Join(errs, "; "))
}
// sendTCP sends bytes to connection over TCP.
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/client/session.go b/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
index f7654d0..7e1e65c 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/client/session.go
@@ -41,7 +41,9 @@
// Cancel the one in the cache and add this one.
i.mux.Lock()
defer i.mux.Unlock()
- i.cancel <- true
+ if i.cancel != nil {
+ i.cancel <- true
+ }
s.Entries[sess.realm] = sess
return
}
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/config/krb5conf.go b/vendor/github.com/jcmturner/gokrb5/v8/config/krb5conf.go
index a763843..f448c8a 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/config/krb5conf.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/config/krb5conf.go
@@ -95,7 +95,7 @@
opts := asn1.BitString{}
opts.Bytes, _ = hex.DecodeString("00000010")
opts.BitLength = len(opts.Bytes) * 8
- return LibDefaults{
+ l := LibDefaults{
CCacheType: 4,
Clockskew: time.Duration(300) * time.Second,
DefaultClientKeytabName: fmt.Sprintf("/usr/local/var/krb5/user/%s/client.keytab", uid),
@@ -115,6 +115,10 @@
UDPPreferenceLimit: 1465,
PreferredPreauthTypes: []int{17, 16, 15, 14},
}
+ l.DefaultTGSEnctypeIDs = parseETypes(l.DefaultTGSEnctypes, l.AllowWeakCrypto)
+ l.DefaultTktEnctypeIDs = parseETypes(l.DefaultTktEnctypes, l.AllowWeakCrypto)
+ l.PermittedEnctypeIDs = parseETypes(l.PermittedEnctypes, l.AllowWeakCrypto)
+ return l
}
// Parse the lines of the [libdefaults] section of the configuration into the LibDefaults struct.
@@ -507,7 +511,7 @@
return r
}
}
- return c.LibDefaults.DefaultRealm
+ return ""
}
// Load the KRB5 configuration from the specified file path.
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/credentials/ccache.go b/vendor/github.com/jcmturner/gokrb5/v8/credentials/ccache.go
index c3b35c7..a021e41 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/credentials/ccache.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/credentials/ccache.go
@@ -4,7 +4,7 @@
"bytes"
"encoding/binary"
"errors"
- "io/ioutil"
+ "os"
"strings"
"time"
"unsafe"
@@ -63,7 +63,7 @@
// LoadCCache loads a credential cache file into a CCache type.
func LoadCCache(cpath string) (*CCache, error) {
c := new(CCache)
- b, err := ioutil.ReadFile(cpath)
+ b, err := os.ReadFile(cpath)
if err != nil {
return c, err
}
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/keytab/keytab.go b/vendor/github.com/jcmturner/gokrb5/v8/keytab/keytab.go
index 5c2e9d7..cd1b8b1 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/keytab/keytab.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/keytab/keytab.go
@@ -8,7 +8,7 @@
"errors"
"fmt"
"io"
- "io/ioutil"
+ "os"
"strings"
"time"
"unsafe"
@@ -93,7 +93,7 @@
}
}
if len(key.KeyValue) < 1 {
- return key, 0, fmt.Errorf("matching key not found in keytab. Looking for %v realm: %v kvno: %v etype: %v", princName.NameString, realm, kvno, etype)
+ return key, 0, fmt.Errorf("matching key not found in keytab. Looking for %q realm: %v kvno: %v etype: %v", princName.PrincipalNameString(), realm, kvno, etype)
}
return key, kv, nil
}
@@ -170,7 +170,7 @@
// Load a Keytab file into a Keytab type.
func Load(ktPath string) (*Keytab, error) {
kt := new(Keytab)
- b, err := ioutil.ReadFile(ktPath)
+ b, err := os.ReadFile(ktPath)
if err != nil {
return kt, err
}
diff --git a/vendor/github.com/jcmturner/gokrb5/v8/types/Authenticator.go b/vendor/github.com/jcmturner/gokrb5/v8/types/Authenticator.go
index 1fdba78..115a02a 100644
--- a/vendor/github.com/jcmturner/gokrb5/v8/types/Authenticator.go
+++ b/vendor/github.com/jcmturner/gokrb5/v8/types/Authenticator.go
@@ -43,7 +43,7 @@
Cksum: Checksum{},
Cusec: int((t.UnixNano() / int64(time.Microsecond)) - (t.Unix() * 1e6)),
CTime: t,
- SeqNumber: seq.Int64(),
+ SeqNumber: seq.Int64() & 0x3fffffff,
}, nil
}
@@ -53,7 +53,7 @@
if err != nil {
return err
}
- a.SeqNumber = seq.Int64()
+ a.SeqNumber = seq.Int64() & 0x3fffffff
//Generate subkey value
sk := make([]byte, keySize, keySize)
rand.Read(sk)