Skip to content

Commit 8ca2308

Browse files
authored
Merge pull request #975 from geographika/encrypt
Update notes about msencrypt and relative paths for 8.4
2 parents 7805153 + 56fc300 commit 8ca2308

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

en/utilities/msencrypt.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Purpose
1818
-----------------------------------------------------------------------------
1919

2020
Used to create an encryption key or to encrypt portions of connection
21-
strings for use in mapfiles (added in v4.10). Typically you might
22-
want to encrypt portions of the CONNECTION parameter for a database
23-
connection. The following CONNECTIONTYPEs are supported for using
21+
strings for use in Mapfiles (added in v4.10). Typically you might
22+
want to encrypt portions of the ``CONNECTION`` parameter for a database
23+
connection. The following ``CONNECTIONTYPEs`` are supported for using
2424
this encryption method:
2525

2626
+ :ref:`OGR <ogr>`
@@ -49,15 +49,22 @@ Use in Mapfile
4949
-----------------------------------------------------------------------------
5050

5151
The location of the encryption key can be specified by two mechanisms, either by
52-
setting the environment variable MS_ENCRYPTION_KEY or using a CONFIG directive
53-
in the MAP object of your mapfile. For example:
52+
setting the variable ``MS_ENCRYPTION_KEY`` in the ``ENV`` section of the MapServer :ref:`Configuration <config>`, or using a ``CONFIG`` directive
53+
in the MAP object of your Mapfile. Prior to MapServer version 8.0 ``MS_ENCRYPTION_KEY`` could be set as an environment variable.
54+
55+
For example you can add the following to your Mapfile:
5456

5557
::
5658

5759
CONFIG MS_ENCRYPTION_KEY "/path/to/mykey.txt"
5860

61+
.. note::
62+
63+
As of MapServer 8.4 this can be an absolute path, or a path relative to the Mapfile.
64+
When setting in the :ref:`Configuration <config>` the path must be absolute.
65+
5966
Use the { and } characters as delimiters for encrypted strings inside database
60-
CONNECTIONs in your mapfile. For example:
67+
``CONNECTION``s in your Mapfile. For example:
6168

6269
::
6370

@@ -117,10 +124,10 @@ it in a second):
117124

118125
3656026A23DBAFC04C402EDFAB7CE714
119126

120-
3. Edit the mapfile to make sure the 'mykey.txt' can be found, using
127+
3. Edit the Mapfile to make sure the 'mykey.txt' can be found, using
121128
the "MS_ENCRYPTION_KEY" environment variable. The CONFIG parameter
122129
inside the MAP object can be used to set an environment variable
123-
inside a mapfile:
130+
inside a Mapfile:
124131

125132
::
126133

@@ -138,5 +145,5 @@ it in a second):
138145
CONNECTION "host=127.0.0.1 dbname=gmap user=postgres
139146
password={3656026A23DBAFC04C402EDFAB7CE714} port=5432"
140147

141-
5. Done! Give your new encrypted mapfile a try with the
148+
5. Done! Give your new encrypted Mapfile a try with the
142149
:ref:`map2img` utility!

0 commit comments

Comments
 (0)