From: Dave Borowitz Date: Thu, 16 Jul 2015 00:58:26 +0000 (-0700) Subject: BaseReceivePack: Add method to override the push cert X-Git-Tag: v4.1.0.201509280440-r~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F52021%2F1;p=jgit.git BaseReceivePack: Add method to override the push cert Change-Id: Id912f45c933c78a85b245fa7b6edebbeb40b009c --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java index ca287f8bfb..776a9f695a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java @@ -269,6 +269,20 @@ public abstract class BaseReceivePack { return pushCert; } + /** + * Set the push certificate used to verify the pusher's identity. + *

+ * Should only be called if reconstructing an instance without going through + * the normal {@link #recvCommands()} flow. + * + * @param cert + * the push certificate to set. + * @since 4.1 + */ + public void setPushCertificate(PushCertificate cert) { + pushCert = cert; + } + /** * Create a new pack receive for an open repository. *