diff --git a/meerkat-common/src/main/java/meerkat/util/BulletinBoardUtils.java b/meerkat-common/src/main/java/meerkat/util/BulletinBoardUtils.java index 35bcd9f..9f8b322 100644 --- a/meerkat-common/src/main/java/meerkat/util/BulletinBoardUtils.java +++ b/meerkat-common/src/main/java/meerkat/util/BulletinBoardUtils.java @@ -18,18 +18,17 @@ public class BulletinBoardUtils { * signed by all given DigitalSignatures * * @param unsignedMessage BasicMessage - * @param signers collection of DigitalSignature which will sign the - * UnsignedBulletinBoardMessage message + * @param signer DigitalSignature which will sign the UnsignedBulletinBoardMessage message * @return BulletinBoardMessage */ - public static BulletinBoardMessage signBulletinBoardMessage(UnsignedBulletinBoardMessage unsignedMessage, Collection signers) throws SignatureException { + public static BulletinBoardMessage signBulletinBoardMessage(UnsignedBulletinBoardMessage unsignedMessage, + DigitalSignature signer) throws SignatureException { BulletinBoardMessage.Builder bulletinBoardMessage = BulletinBoardMessage.newBuilder(); bulletinBoardMessage.setMsg(unsignedMessage); - for (DigitalSignature signer : signers) { - signer.updateContent(unsignedMessage); - Crypto.Signature signature = signer.sign(); - bulletinBoardMessage.addSig(signature); - } + signer.updateContent(unsignedMessage); + Crypto.Signature signature = signer.sign(); + bulletinBoardMessage.addSig(signature); + return bulletinBoardMessage.build(); }