Commit e10a19a3 authored by Youness Alaoui's avatar Youness Alaoui

Revert "If the key len is -1, then do an strlen on the key"

This reverts commit 0a4f25e8.

The commit did not compile.. the key_len is size_t so it's an unsigned...
parent 0a4f25e8
...@@ -176,10 +176,7 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg, ...@@ -176,10 +176,7 @@ StunValidationStatus stun_agent_validate (StunAgent *agent, StunMessage *msg,
} }
} }
if (key != NULL && key_len == -1) { if (key != NULL && key_len > 0) {
key_len = strlen (key);
}
if (key != NULL) {
hash = (uint8_t *) stun_message_find (msg, hash = (uint8_t *) stun_message_find (msg,
STUN_ATTRIBUTE_MESSAGE_INTEGRITY, &hlen); STUN_ATTRIBUTE_MESSAGE_INTEGRITY, &hlen);
...@@ -374,10 +371,6 @@ size_t stun_agent_finish_message (StunAgent *agent, StunMessage *msg, ...@@ -374,10 +371,6 @@ size_t stun_agent_finish_message (StunAgent *agent, StunMessage *msg,
int i; int i;
stun_transid_t id; stun_transid_t id;
if (key != NULL && key_len == -1) {
key_len = strlen (key);
}
if (key != NULL) { if (key != NULL) {
ptr = stun_message_append (msg, STUN_ATTRIBUTE_MESSAGE_INTEGRITY, 20); ptr = stun_message_append (msg, STUN_ATTRIBUTE_MESSAGE_INTEGRITY, 20);
if (ptr == NULL) { if (ptr == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment