Просмотр исходного кода

error handling fix for issue-50

Jonathan Turner 8 лет назад
Родитель
Сommit
9529ca09d4
2 измененных файлов с 5 добавлено и 2 удалено
  1. 4 1
      gssapi/krb5Token.go
  2. 1 1
      testenv/krb5kdc-vagrant/kdc.conf

+ 4 - 1
gssapi/krb5Token.go

@@ -127,7 +127,10 @@ func newAuthenticator(creds credentials.Credentials, keyType int) (types.Authent
 	if err != nil {
 		return auth, krberror.Errorf(err, krberror.KRBMsgError, "Error generating new authenticator")
 	}
-	etype, _ := crypto.GetEtype(keyType)
+	etype, err := crypto.GetEtype(keyType)
+	if err != nil {
+		return auth, krberror.Errorf(err, krberror.KRBMsgError, "Error generating new authenticator")
+	}
 	auth.GenerateSeqNumberAndSubKey(keyType, etype.GetKeyByteSize())
 	auth.Cksum = types.Checksum{
 		CksumType: chksumtype.GSSAPI,

+ 1 - 1
testenv/krb5kdc-vagrant/kdc.conf

@@ -10,5 +10,5 @@
   acl_file = /var/kerberos/krb5kdc/kadm5.acl
   dict_file = /usr/share/dict/words
   admin_keytab = /opt/krb5/data/kadm5.keytab
-  supported_enctypes = aes128-cts-hmac-sha1-96:normal aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha256-128:normal aes256-cts-hmac-sha384-192:normal des3-cbc-sha1-kd:normal rc4-hmac:normal
+  supported_enctypes = des-cbc-crc:normal rc4-hmac:normal
  }