mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2024-12-11 22:35:40 +01:00
Do not ignore ODoH encryption errors
This commit is contained in:
parent
f9cecd1215
commit
31f4d7aa03
@ -105,6 +105,9 @@ func (t ODoHTarget) encryptQuery(query []byte) (ODoHQuery, error) {
|
|||||||
|
|
||||||
aad := append([]byte{0x01}, t.keyID...)
|
aad := append([]byte{0x01}, t.keyID...)
|
||||||
ciphertext, err := clientCtx.EncryptToServer(odohPlaintext, aad)
|
ciphertext, err := clientCtx.EncryptToServer(odohPlaintext, aad)
|
||||||
|
if err != nil {
|
||||||
|
return ODoHQuery{}, err
|
||||||
|
}
|
||||||
|
|
||||||
encryptedMessage := encodeLengthValue(append(encryptedSharedSecret, ciphertext...))
|
encryptedMessage := encodeLengthValue(append(encryptedSharedSecret, ciphertext...))
|
||||||
odohMessage := append(append([]byte{0x01}, t.keyID...), encryptedMessage...)
|
odohMessage := append(append([]byte{0x01}, t.keyID...), encryptedMessage...)
|
||||||
|
Loading…
Reference in New Issue
Block a user