Index: configure.in =================================================================== --- configure.in (revision 17720) +++ configure.in (working copy) @@ -739,6 +739,32 @@ AC_SUBST(JAVA_CLASSPATH) AC_SUBST(JAVAHL_TESTS_TARGET) + +dnl +dnl Give the confiscator control over whether the IC server interfacing code is compiled +dnl +AC_ARG_ENABLE( + [certification], + AC_HELP_STRING( + [--enable-certification], + [Include code for interfacing to an information currency server.]), , + [enable_certification="no"]) + +if test no != "$enable_certification"; then + AC_CHECK_HEADERS(openssl/evp.h libxml/tree.h xmlsec/xmlsec.h, + AC_DEFINE( + [CERTIFICATION_SUPPORT], [1], + [Define if you want CVS to be able to create information currency from submitted code.]) + AC_CHECK_LIB(ssl,EVP_MD_CTX_init,[LIBS=" -lssl ${LIBS} "]) + AC_CHECK_LIB(xml2,xmlNewDoc,[LIBS=" -lxml2 ${LIBS} "]) + AC_CHECK_LIB(xmlsec1,xmlSecParseFile,[LIBS=" `xmlsec1-config --libs` ${LIBS} "; CFLAGS=" `xmlsec1-config --cflags` ${CFLAGS} "]) +) +fi +dnl +dnl end --enable-certification +dnl + + dnl Pass some config data ---------------------------- AC_SUBST(abs_builddir) Index: subversion/include/svn_client.h =================================================================== --- subversion/include/svn_client.h (revision 17720) +++ subversion/include/svn_client.h (working copy) @@ -2570,6 +2570,34 @@ svn_client_ctx_t *ctx, apr_pool_t *pool); + +/** + * The location of the configuration file for information + * currency issuance. + **/ +#define SVN_CONFIG_CATEGORY_ICSVN "icsvn" + +/** + * Generate information currency from the changeset obtained from the + * the commit_info, and base_dir. If config_dir is not NULL, read configuration + * files from this directory. + * + * @param issuance_result_string The human readable status message for the commit. + * @param commit_info The commit info generated by the preceding commit. + * @param base_dir The base dir for the working copy. + * @param config_dir The directory containing the configuration. + * @param ctx Client context. + * @param pool The pool from which to perform memory allocations. + * @return error generated by the function. + */ +svn_error_t * +svn_client_issuance ( char **issuance_result_string, + svn_client_commit_info_t *commit_info, + const char *base_dir, + const char *config_dir, + svn_client_ctx_t *ctx, + apr_pool_t *pool ); + #ifdef __cplusplus } #endif /* __cplusplus */ Index: subversion/svn/commit-cmd.c =================================================================== --- subversion/svn/commit-cmd.c (revision 17720) +++ subversion/svn/commit-cmd.c (working copy) @@ -31,6 +31,7 @@ #include "svn_config.h" #include "cl.h" +#include "svn_private_config.h" /* This implements the `svn_opt_subcommand_t' interface. */ @@ -102,5 +103,28 @@ if (commit_info && ! opt_state->quiet) SVN_ERR (svn_cl__print_commit_info (commit_info, pool)); +#ifdef CERTIFICATION_SUPPORT + + if ( ! opt_state->quiet ) + SVN_ERR ( svn_cmdline_printf ( pool, "\nCERTIFICATION_SUPPORT defined.\n" ) ); + + char *issuance_return_string; + if ( commit_info ) + { + SVN_ERR ( svn_client_issuance ( &issuance_return_string, + commit_info, + base_dir, + opt_state->config_dir, + ctx, + pool ) ); + + /* SVN_ERR ( svn_client_issuance ( &issuance_return_string, commit_info, base_dir, ctx, pool ) ); */ + + if ( ! opt_state->quiet ) + SVN_ERR ( svn_cmdline_printf ( pool, "\n%s\n", issuance_return_string ) ); + } + +#endif /* CERTIFICATION_SUPPORT */ + return SVN_NO_ERROR; }