gerrit/tools
Dave Borowitz b8336f176a Move most GPG-related code to a gerrit-gpg module
Bouncy Castle is still an optional dependency for Gerrit, so we want
to avoid accidentally attempting to load Bouncy Castle classes when
they might not be available. Rather than try to guard every
org.bouncycastle.* reference with a hasPGP() check, reduce the surface
area of calls that actually require Bouncy Castle. Move almost all
code that calls Bouncy Castle into a new module, gerrit-gpg.

Callers need only interact with this module by installing the
GpgModule, which is careful to protect all Bouncy Castle class loading
with the appropriate havePGP() check. Moreover, this module doesn't
need to be installed in the gerrit-server package at all, so we can
break the compile-time dependency between gerrit-server and Bouncy
Castle, so accidentally introducing a dependency on Bouncy Castle
results in a compile error.

The REST API and extension APIs dealing with GPG keys only refer to
the GpgKeyInfo POJO, and don't need to actually refer to Bouncy Castle
classes. Add a shim interface, GpgApiAdapter, that is used by
AccountApiImpl to process GPG keys. GpgModule binds this interface to
either the Bouncy Castle enabled implementation, or a not-implemented
implementation.

Since there are various places in the server code where we want to
inspect whether signed push is enabled at the server level, but we
don't want to have to call into gerrit-gpg code to do this, bind a
boolean with @EnableSignedPush from GpgModule.

Change-Id: Idbab00a52d86216cae73d02876d56be54aef6581
2015-08-28 14:13:13 -04:00
..
eclipse Move most GPG-related code to a gerrit-gpg module 2015-08-28 14:13:13 -04:00
maven Buck: Allow to trigger Maven deployment even when nothing changed 2015-06-25 09:23:03 +00:00
util Add a bulk query suite tester 2013-09-19 18:29:07 +00:00
__init__.py Buck: Adjust to unflattened directory structure for python libraries 2013-11-30 20:19:33 +01:00
BUCK Update Buck 2014-09-01 02:57:52 +00:00
build.defs Build Gerrit in headless mode 2015-03-04 10:59:02 +09:00
checkstyle_suppressions.xml Update Checkstyle config to ignore generated sources 2015-08-26 07:02:38 +00:00
checkstyle.xml Update Checkstyle config to ignore generated sources 2015-08-26 07:02:38 +00:00
default.defs Move in-function import to file header for BUCK file 2015-08-05 10:14:06 +02:00
download_all.py tools: use python on path 2015-06-18 17:10:11 +02:00
download_file.py Disentangle BUCK caches for internally built and downloaded artifacts 2015-07-07 12:59:51 +02:00
gerrit.importorder Update import order settings to list all top-level packages 2015-03-25 20:36:56 +00:00
git.defs For plugins, run 'git describe' from their BUCK directory 2015-08-05 10:14:06 +02:00
GoogleFormat.xml Eclipse: Bump java source and target level to 7 2013-11-29 00:15:50 +01:00
gwt-constants.defs Remove org.json:json and fix gwt-dev deps 2015-06-25 10:03:24 -07:00
java_doc.defs Allow to create javadocs for multiple packages 2014-10-22 01:28:59 +02:00
java_sources.defs Buck: Align gerrit build interface to bucklets 2014-09-09 13:20:47 +00:00
pack_war.py tools: use python on path 2015-06-18 17:10:11 +02:00
plugin_archetype_deploy.sh Restrict the input of plugin_archetype_deploy.sh 2014-09-01 13:56:10 +08:00
util_test.py tools: use python on path 2015-06-18 17:10:11 +02:00
util.py Update SSHD to 0.12.0 2014-09-11 09:48:07 +02:00
version.py version.py: Also update the version in the plugin documentation 2015-07-06 06:42:51 +00:00