-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added server identity key to client bundle (#69)
* added server_identity key in client bundle, refactored EncryptionHeader * added check on bundle processing on server to match serverIdentity key
- Loading branch information
1 parent
8890705
commit 88a387f
Showing
9 changed files
with
53 additions
and
51 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
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
42 changes: 7 additions & 35 deletions
42
bundle-core/src/main/java/com/ddd/model/EncryptionHeader.java
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,46 +1,18 @@ | ||
package com.ddd.model; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
|
||
import java.io.File; | ||
|
||
@Data | ||
@Getter | ||
@Builder | ||
public class EncryptionHeader { | ||
private final File serverSignedPreKey; | ||
private final File serverIdentityKey; | ||
private final File serverRatchetKey; | ||
|
||
public File getServerSignedPreKey() { | ||
return this.serverSignedPreKey; | ||
} | ||
|
||
public File getServerIdentityKey() { | ||
return this.serverIdentityKey; | ||
} | ||
|
||
public File getServerRatchetKey() { | ||
return this.serverRatchetKey; | ||
} | ||
|
||
public EncryptionHeader(File serverSignedPreKey, File serverIdentityKey, File serverRatchetKey) { | ||
this.serverSignedPreKey = serverSignedPreKey; | ||
this.serverIdentityKey = serverIdentityKey; | ||
this.serverRatchetKey = serverRatchetKey; | ||
} | ||
|
||
private File clientBaseKey; | ||
private File clientIdentityKey; | ||
|
||
public EncryptionHeader(File clientBaseKey, File clientIdentityKey) { | ||
this.clientBaseKey = clientBaseKey; | ||
this.clientIdentityKey = clientIdentityKey; | ||
this.serverSignedPreKey = null; | ||
this.serverIdentityKey = null; | ||
this.serverRatchetKey = null; | ||
} | ||
|
||
public File getClientBaseKey() { | ||
return clientBaseKey; | ||
} | ||
|
||
public File getClientIdentityKey() { | ||
return clientIdentityKey; | ||
} | ||
} |
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