2010-02-18 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Thu, 18 Feb 2010 01:30:25 +0000 (01:30 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Thu, 18 Feb 2010 01:30:25 +0000 (01:30 -0000)
* scripts/mono-configuration-crypto.in: added

* scripts/Makefile.am: added mono-configuration-crypto targets

2010-02-18  Marek Habersack  <mhabersack@novell.com>

* mono-configuration-crypto.1: added

* Makefile.am (man_MANS): added mono-configuration-crypto.1

svn path=/trunk/mono/; revision=151952

ChangeLog
man/ChangeLog
man/Makefile.am
man/mono-configuration-crypto.1 [new file with mode: 0644]
scripts/Makefile.am
scripts/mono-configuration-crypto.in [new file with mode: 0644]

index d8338502bc058e1b4827ead3fa8ea7c968e653bb..cbda7dcc71f0d79db9290ccfe424eaeb0f011245 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-18  Marek Habersack  <mhabersack@novell.com>
+
+       * scripts/mono-configuration-crypto.in: added
+
+       * scripts/Makefile.am: added mono-configuration-crypto targets
+
 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
 
        * configure.in: Fix the setting of LLVM_CXXFLAGS.
index ced19e06321ec9b385db3137f7505e31c4b9cebd..a2b919eacdf4f78a2598a8e6cdd65955420ae5ea 100644 (file)
@@ -1,3 +1,9 @@
+2010-02-18  Marek Habersack  <mhabersack@novell.com>
+
+       * mono-configuration-crypto.1: added
+
+       * Makefile.am (man_MANS): added mono-configuration-crypto.1
+
 2010-02-10  Geoff Norton  <gnorton@novell.com>
 
        * mono.1: Document the aot compiler options.
index a24a5cbb1ff8b86a1a828ae63168ce3a24c78909..69e6432a08ffbc1530f983870daefad685e14d19 100644 (file)
@@ -50,6 +50,7 @@ man_MANS = \
        sqlsharp.1            \
        wsdl.1                \
        xbuild.1              \
-       xsd.1
+       xsd.1                 \
+       mono-configuration-crypto.1
 
 EXTRA_DIST = $(man_MANS)
diff --git a/man/mono-configuration-crypto.1 b/man/mono-configuration-crypto.1
new file mode 100644 (file)
index 0000000..ce48364
--- /dev/null
@@ -0,0 +1,94 @@
+.TH Mono "mono-configuration-crypto"
+.SH NAME
+mono-configuration-crypto, \- Mono configuration utility to manage encryption keys and encrypt/decrypt config file sections
+.SH SYNOPSIS
+.B mono-configuration-crypto <options>
+.SH DESCRIPTION
+mono-configuration-crypto is a utility to manage mono encryption key container store and to encrypt/decrypt config
+file sections.
+.SH OPTIONS
+.TP
+.B -h, -?, --help
+Show usage information
+
+.TP
+.B   -v, --verbose
+Show verbose information (including exception stacktraces)
+
+.TP
+.B   -m, --machine, --global
+Use machine (global) store for all the key actions. Note that on Unix machines global store is located in
+\fI/usr/share/.mono\fR and modifying it requires root user permissions.
+
+.TP
+.B   -u, --user, --local
+Use local (user) store for all the key actions. User key store is located in the \fI$HOME/.config/.mono\fR
+directory. This is the default location used by mono-configuration-crypto.
+
+.TP
+.B   -l, --list
+List all the key container names in the store. Note that some container names might be just GUID strings.
+
+.TP
+.B   -c, --create
+Creates an RSA public/private key pair. If the specified container (see the \fI-f\fR option) already exists, the
+operation will fail.
+
+.TP
+.B   -i, --import
+Imports key to a container. Imports a key from file (specified by the \fI-f\fR option) and puts it as the first key
+in the specified container (see the \fI-n\fR option). If container exists, its first key is replaced. If container
+doesn't exist, it is created. No validation is performed on the key value - this is left to the protection provider or
+encryption code which uses the key.
+
+.TP
+.B   -x, --export
+Exports key from a container. Exports a key from indicated container (see the \fI-n\fR option) and puts it in the
+specified file (see the \fI-f\fR option) as XML. The file can later be used to import the key.
+
+.TP
+.B   -r, --remove
+Remove a container. Physically removes the container file from disk.
+
+.TP
+.B   -f, --file=VALUE
+File name for import or export operations. All options which read or write anything to/from files require this option
+to be present on the command line.
+
+.TP
+.B   -cf, --config-file=VALUE
+Config file name. Specifies base name of the config file, used in encrypt and decrypt operations. Files are sought for
+case-insensitively. Defaults to \fIWeb.config\fR
+
+.TP
+.B   -n, --name=VALUE
+Container name. If this option is absent from the command line it defaults to \fIMonoFrameworkConfigurationKey\fR (the
+default key name used by System.Configuration section encryption/decryption code)
+
+.TP
+.B   -s, --size=VALUE
+Key size. Specifies the key length for the create operation (see the \fI-c\fR option). Defaults to 1024.
+
+.TP
+.B   -p, --path=VALUE
+Application physical path. Used when encrypting/decrypting configuration file sections to specify the directory in which
+the configuration file lives (see the \fI-cf\fR option). Defaults to current directory.
+
+.TP
+.B   -d, --dec, --decrypt=VALUE
+Decrypt configuration section. Configuration section must follow the format used when calling ConfigurationManager.GetSection,
+i.e.: path/to/section. Only sections known to the configuration system will be processed.
+
+.TP
+.B   -e, --enc, --encrypt=VALUE
+Encrypt configuration section. Configuration section must follow the format used when calling ConfigurationManager.GetSection,
+i.e.: path/to/section. Only sections known to the configuration system will be processed.
+
+.SH AUTHOR
+Marek Habersack
+.SH COPYRIGHT
+Copyright (C) 2010 Novell, Inc (http://novell.com)
+.SH MAILING LISTS
+Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
+.SH WEB SITE
+Visit: http://mono-project.com for details
index 59c0d93b13448511865c7648de7e75d86595a4d9..eb208d179e4eee348a7a9ce363cb04486da6413f 100644 (file)
@@ -37,7 +37,8 @@ bin_SCRIPTS = \
        mod$(SCRIPT_SUFFIX)     \
        mono-test-install       \
        peverify                        \
-       mono-heapviz
+       mono-heapviz            \
+       $(scripts_mono_configuration_crypto)
 
 if INSTALL_4_0
 bin_SCRIPTS += $(scripts_4_0)
@@ -130,8 +131,9 @@ scripts_service = mono-service mono-service2
 scripts_nunit = nunit-console$(SCRIPT_SUFFIX) nunit-console2$(SCRIPT_SUFFIX)
 scripts_rpmhelpers = mono-find-provides mono-find-requires
 scripts_mcs = mcs$(SCRIPT_SUFFIX)
+scripts_mono_configuration_crypto = mono-configuration-crypto$(SCRIPT_SUFFIX)
 
-CLEANFILES = $(scripts_mcs) $(scripts_2_0_umask) $(scripts_2_0) $(scripts_defaults) $(scripts_4_0) mono-service mono-service2 nunit-console nunit-console2 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
+CLEANFILES = $(scripts_mono_configuration_crypto) $(scripts_mcs) $(scripts_2_0_umask) $(scripts_2_0) $(scripts_defaults) $(scripts_4_0) mono-service mono-service2 nunit-console nunit-console2 mono-find-provides mono-find-requires mod $(MDOC_SUBCOMMANDS)
 DISTCLEANFILES = $(pkgconfig_DATA) $(scripts_rpmhelpers)
 
 EXTRA_DIST =                   \
@@ -148,7 +150,8 @@ EXTRA_DIST =                        \
        mono-heapviz            \
        $(MDOC_COMPAT)          \
        patch-quiet.sh          \
-       get-cygwin-deps.sh
+       get-cygwin-deps.sh      \
+       mono-configuration-crypto.in
 
 if USE_JIT
 mono_interp = mono
@@ -232,6 +235,10 @@ $(scripts_4_0): $(SCRIPT_IN) Makefile
        $(REWRITE4) -e "s,@""exe_name@,$$n,g" $(srcdir)/$(SCRIPT_IN) | $(FILTER) > $@.tmp
        mv -f $@.tmp $@
 
+$(scripts_mono_configuration_crypto): mono-configuration-crypto.in
+       $(REWRITE2)  -e "s,@exe_name@,mono-configuration-crypto,g" $(srcdir)/mono-configuration-crypto.in > $@.tmp
+       mv -f $@.tmp $@
+
 $(MDOC_SUBCOMMANDS): Makefile
        for script in $(MDOC_SUBCOMMANDS) ; do                  \
                cmd=`echo $$script | sed 's/mdoc-//'` ;         \
diff --git a/scripts/mono-configuration-crypto.in b/scripts/mono-configuration-crypto.in
new file mode 100644 (file)
index 0000000..d161f56
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/mono-configuration-crypto/@framework_version@/@exe_name@.exe "$@"