Author: jflesch
Date: 2007-08-13 15:41:22 +0000 (Mon, 13 Aug 2007)
New Revision: 14650
Modified:
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKAttachmentFactory.java
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoardAttachment.java
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java
Log:
Fix the message signature checking : The board name must be in lower case
Modified:
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKAttachmentFactory.java
===================================================================
---
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKAttachmentFactory.java
2007-08-13 15:37:07 UTC (rev 14649)
+++
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKAttachmentFactory.java
2007-08-13 15:41:22 UTC (rev 14650)
@@ -42,7 +42,7 @@
public KSKAttachment getAttachment(Element attachmentEl) {
if (attachmentEl.getAttribute("type").length() <= 0) {
- Logger.warning(this, "No type specified in the
attachment ("+
+ Logger.notice(this, "No type specified in the
attachment ("+
attachmentEl.toString()+")");
return null;
}
@@ -55,7 +55,7 @@
a = new KSKBoardAttachment();
if (a == null) {
- Logger.warning(this, "Unknown attachment type : "
+ Logger.notice(this, "Unknown attachment type : "
+attachmentEl.getAttribute("type"));
}
else
Modified:
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoardAttachment.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoardAttachment.java
2007-08-13 15:37:07 UTC (rev 14649)
+++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoardAttachment.java
2007-08-13 15:41:22 UTC (rev 14650)
@@ -244,7 +244,7 @@
public StringBuffer getSignedStr() {
StringBuffer buf = new StringBuffer();
-
buf.append(boardName).append(KSKMessageParser.SIGNATURE_ELEMENTS_SEPARATOR);
+
buf.append(boardName.toLowerCase()).append(KSKMessageParser.SIGNATURE_ELEMENTS_SEPARATOR);
if (publicKey != null)
buf.append(publicKey).append(KSKMessageParser.SIGNATURE_ELEMENTS_SEPARATOR);
Modified:
trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java
2007-08-13 15:37:07 UTC (rev 14649)
+++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java
2007-08-13 15:41:22 UTC (rev 14650)
@@ -305,7 +305,7 @@
- public final static char SIGNATURE_ELEMENTS_SEPARATOR = '|';
+ public final static String SIGNATURE_ELEMENTS_SEPARATOR = "|";
/**
* @param withMsgId require to check the signature
@@ -362,7 +362,7 @@
boolean ret = identity.check(getSignedContent(true), signature);
if (!ret) {
- Logger.warning(this, "Invalid signature !");
+ Logger.notice(this, "Invalid signature !");
}
return ret;