-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate SignatureOps in server and client
- Loading branch information
Showing
15 changed files
with
301 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.DS_Store | ||
coniks_common/src/org/coniks/coniks_common/*.class | ||
coniks_common/src/com/google/protobuf/*.java | ||
coniks_server/src/org/coniks/coniks_server/*.class | ||
coniks_test_client/src/org/coniks/coniks_test_client/*.class | ||
target | ||
bin | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,13 @@ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
import java.security.interfaces.DSAPublicKey; | ||
import java.util.Arrays; | ||
|
||
// coniks-java imports | ||
import org.coniks.crypto.*; | ||
|
||
/** Implements a key change operation. | ||
* | ||
*@author Michael Rochlin | ||
*@author Marcela S. Melara ([email protected]) | ||
*/ | ||
public class KeyChange extends Operation { | ||
private String newKeyData; | ||
|
@@ -97,10 +101,21 @@ public boolean canChangeInfo(UserLeafNode uln) { | |
ServerLogger.error("Tried to make unsigned KeyChange but wasn't allowed"); | ||
return false; | ||
} | ||
if (!uln.allowsUnsignedKeychange() | ||
&& !SignatureOps.verifySigFromDSA(msg, sig, uln.getChangeKey())) { | ||
ServerLogger.error("Requires that key changes be signed, but the signature was invalid"); | ||
return false; | ||
if (!uln.allowsUnsignedKeychange()) { | ||
|
||
boolean res = false; | ||
|
||
try { | ||
res = Signing.dsaVerify(uln.getChangeKey(), msg, sig); | ||
} | ||
catch (Exception e) { | ||
ServerLogger.error("[KeyChange] "+e.getMessage()); | ||
} | ||
|
||
if(!res) { | ||
ServerLogger.error("Requires that key changes be signed, but the signature was invalid"); | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.