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...)
|
||||
ciphertext, err := clientCtx.EncryptToServer(odohPlaintext, aad)
|
||||
if err != nil {
|
||||
return ODoHQuery{}, err
|
||||
}
|
||||
|
||||
encryptedMessage := encodeLengthValue(append(encryptedSharedSecret, ciphertext...))
|
||||
odohMessage := append(append([]byte{0x01}, t.keyID...), encryptedMessage...)
|
||||
|
|
Loading…
Reference in New Issue