made mSignatureTime optional in CryptoOperationHelper
This commit is contained in:
@@ -52,6 +52,7 @@ import org.sufficientlysecure.keychain.util.TestingUtils;
|
||||
import java.io.PrintStream;
|
||||
import java.security.Security;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
@@ -158,7 +159,7 @@ public class CertifyOperationTest {
|
||||
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
||||
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(),
|
||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(new Date(), mKeyPhrase1));
|
||||
|
||||
Assert.assertTrue("certification must succeed", result.success());
|
||||
|
||||
@@ -186,7 +187,7 @@ public class CertifyOperationTest {
|
||||
CertifyActionsParcel actions = new CertifyActionsParcel(mStaticRing1.getMasterKeyId());
|
||||
actions.add(new CertifyAction(mStaticRing2.getMasterKeyId(), null,
|
||||
mStaticRing2.getPublicKey().getUnorderedUserAttributes()));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(new Date(), mKeyPhrase1));
|
||||
|
||||
Assert.assertTrue("certification must succeed", result.success());
|
||||
|
||||
@@ -209,7 +210,7 @@ public class CertifyOperationTest {
|
||||
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(new Date(), mKeyPhrase1));
|
||||
|
||||
Assert.assertFalse("certification with itself must fail!", result.success());
|
||||
Assert.assertTrue("error msg must be about self certification",
|
||||
@@ -228,7 +229,8 @@ public class CertifyOperationTest {
|
||||
uids.add("nonexistent");
|
||||
actions.add(new CertifyAction(1234L, uids));
|
||||
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(new Date(),
|
||||
mKeyPhrase1));
|
||||
|
||||
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
||||
Assert.assertTrue("must contain error msg about not found",
|
||||
@@ -240,7 +242,8 @@ public class CertifyOperationTest {
|
||||
actions.add(new CertifyAction(mStaticRing1.getMasterKeyId(),
|
||||
mStaticRing2.getPublicKey().getUnorderedUserIds()));
|
||||
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(mKeyPhrase1));
|
||||
CertifyResult result = op.execute(actions, new CryptoInputParcel(new Date(),
|
||||
mKeyPhrase1));
|
||||
|
||||
Assert.assertFalse("certification of nonexistent key must fail", result.success());
|
||||
Assert.assertTrue("must contain error msg about not found",
|
||||
|
||||
Reference in New Issue
Block a user