From 440d5307676b573ce4041a7b908b22ee53efc0b2 Mon Sep 17 00:00:00 2001 From: James Howe Date: Thu, 13 Jul 2017 14:36:22 +0100 Subject: [PATCH] Add MESSAGE_INTEGRITY to indications RFC 5389 Section 10.1.1 > For a request or indication message, the agent MUST include the USERNAME and MESSAGE-INTEGRITY attributes in the message. --- .../java/org/ice4j/attribute/MessageIntegrityAttribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ice4j/attribute/MessageIntegrityAttribute.java b/src/main/java/org/ice4j/attribute/MessageIntegrityAttribute.java index a963bb94..a1e4907f 100644 --- a/src/main/java/org/ice4j/attribute/MessageIntegrityAttribute.java +++ b/src/main/java/org/ice4j/attribute/MessageIntegrityAttribute.java @@ -283,7 +283,7 @@ public byte[] encode( char msgType = (char) (((content[0] & 0xFF) << 8) | (content[1] & 0xFF)); - if(Message.isRequestType(msgType)) + if(Message.isRequestType(msgType) || Message.isIndicationType(msgType)) { /* attribute part of a request, use the remote key */ key = stunStack.getCredentialsManager().getRemoteKey(username,