]> source.dussan.org Git - jgit.git/commitdiff
BaseReceivePack: Add method to override the push cert 21/52021/1
authorDave Borowitz <dborowitz@google.com>
Thu, 16 Jul 2015 00:58:26 +0000 (17:58 -0700)
committerDave Borowitz <dborowitz@google.com>
Thu, 16 Jul 2015 01:09:42 +0000 (18:09 -0700)
Change-Id: Id912f45c933c78a85b245fa7b6edebbeb40b009c

org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java

index ca287f8bfb251e4d998fa7243080660597ed0dea..776a9f695af230299f8e4462791ddb14ecf97b38 100644 (file)
@@ -269,6 +269,20 @@ public abstract class BaseReceivePack {
                return pushCert;
        }
 
+       /**
+        * Set the push certificate used to verify the pusher's identity.
+        * <p>
+        * 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.
         *