```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-04-28 22:28:58 +05:30
коммит произвёл GitHub
родитель 5cf721fdc0
Коммит 4bc2ed3973
4 изменённых файлов: 12 добавлений и 5 удалений

9
vendor/github.com/mattermost/gosaml2/types/encrypted_key.go сгенерированный поставляемый
Просмотреть файл

@@ -18,6 +18,7 @@ import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/des"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
@@ -173,11 +174,17 @@ func (ek *EncryptedKey) DecryptSymmetricKey(cert *tls.Certificate) (cipher.Block
//The RSA v1.5 Key Transport algorithm given below are those used in conjunction with TRIPLEDES
//Please also see https://www.w3.org/TR/xmlenc-core/#sec-Algorithms and
//https://www.w3.org/TR/xmlenc-core/#rsav15note.
b, err := aes.NewCipher(pt)
b, err := des.NewTripleDESCipher(pt)
if err != nil {
return nil, err
}
// FIXME: The version we had previously in our fork, AES seems more secure from my Googling.
// b, err := aes.NewCipher(pt)
// if err != nil {
// return nil, err
// }
return b, nil
default:
return nil, fmt.Errorf("unsupported encryption algorithm: %s", ek.EncryptionMethod.Algorithm)