[−][src]Function odoh_rs::protocol::parse_received_query
pub async fn parse_received_query(
key_pair: &ObliviousDoHKeyPair,
odoh_encrypted_query_msg: &[u8]
) -> Result<(ObliviousDoHQueryBody, Vec<u8>)>
Deserializes, validates and decrypts the query sent by the client to generate
an ObliviousDoHQueryBody
that will be used by the resolver to generate a response.
It also checks if the key id of the query matches the key id of the server, discarding the message if that isn't the case.
odoh_encrypted_query_msg
= ObliviousDoHMessage.to_bytes()
Returns query_body
and server_secret
generated from server_ctx
.