diff options
author | Dave Borowitz <dborowitz@google.com> | 2015-06-15 16:50:22 -0400 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2015-06-18 09:50:12 -0400 |
commit | b822f9b51d9a430ce17e11daf7f4022f32b50600 (patch) | |
tree | f3a0fe3588bdd12de907912a051acf20251225fe /org.eclipse.jgit.test/tst/org/eclipse/jgit/transport | |
parent | 48c35edfd2e65bbc4229d287e808c98b03b04544 (diff) | |
download | jgit-b822f9b51d9a430ce17e11daf7f4022f32b50600.tar.gz jgit-b822f9b51d9a430ce17e11daf7f4022f32b50600.zip |
PushCertificateParser: include begin/end lines in signature
The signature is intended to be passed to a verification library such
as Bouncy Castle, which expects these lines to be present in order to
parse the signature.
Change-Id: I22097bead2746da5fc53419f79761cafd5c31c3b
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/transport')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java index 185c97e0ae..7de9333967 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushCertificateParserTest.java @@ -43,8 +43,8 @@ package org.eclipse.jgit.transport; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.EOFException; @@ -119,9 +119,9 @@ public class PushCertificateParserTest { assertEquals(concatPacketLines(input, 0, 6), cert.toText()); - String signature = concatPacketLines(input, 7, 16); - assertFalse(signature.contains(PushCertificateParser.BEGIN_SIGNATURE)); - assertFalse(signature.contains(PushCertificateParser.END_SIGNATURE)); + String signature = concatPacketLines(input, 6, 17); + assertTrue(signature.startsWith(PushCertificateParser.BEGIN_SIGNATURE)); + assertTrue(signature.endsWith(PushCertificateParser.END_SIGNATURE)); assertEquals(signature, cert.getSignature()); } |