<?xml version="1.0"?>
<!--

  Copyright (c) 2020 Airbus Secure Logging Team

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License version 2 as published
  by the Free Software Foundation, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

  As an additional exemption you are allowed to compile & link against the
  OpenSSL libraries as published by the OpenSSL project. See the file
  COPYING for details.

-->
<reference xmlns="http://docbook.org/ns/docbook" version="5.0">
  <info>
    <productname/>
    <title>The slogencrypt manual page</title>
  </info>
  <refentry xml:id="slogencrypt.1">
    <refmeta>
      <refentrytitle>slogencrypt</refentrytitle>
      <manvolnum>1</manvolnum>
      <refmiscinfo class="version">4.8</refmiscinfo>
      <refmiscinfo class="source"/>
    </refmeta>
    <refnamediv>
      <refname>slogencrypt</refname>
      <refpurpose>Encrypt existing plain text log files using the <command>syslog-ng</command> secure logging environment</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <cmdsynopsis>
        <command>slogencrypt</command>
        <arg>options</arg><arg>arguments</arg>
      </cmdsynopsis>
    </refsynopsisdiv>
    <refsection version="5.0">
      <title>Description</title>
      <para>The <command>slogencrypt</command> is used to encrypt plain text log file using an existing secure logging environment. Using this utility, log files obtained from a previous installation of <command>syslog-ng</command> or another logging system can be transferred to a secure logging environment. The order of the log entries is preserved. Encrypting plain text log files using an existing secure logging environment, requires the current encryption key to be supplied in order to preserve consistency.</para>
      <para>General call sequence: <command>slogencrypt -k &lt;key file&gt; -m &lt;MAC file&gt; &lt;new key file&gt; &lt;new MAC file&gt; &lt;plain text log&gt;  &lt;output file&gt;  [counter]</command></para>
    </refsection>
    <refsection>
      <title>Arguments</title>
      <variablelist>
        <?dbfo term-width="1.25in"?>
        <varlistentry>
          <term><command>new key file</command>
          </term>
          <listitem>
            <para>The file that will contain the new current encryption key after successful encryption.</para>
          </listitem>
        </varlistentry>
       <varlistentry>
          <term><command>new MAC file</command>
          </term>
          <listitem>
            <para>The file receiving the new current message authentication code (MAC) of the secure encrypted destination after encryption. In case an existing file is supplied, new entries will be appended.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>input log file</command>
          </term>
          <listitem>
            <para>The plain text log file that will be encrypted using the secure logging environment.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>output log file</command>
          </term>
          <listitem>
            <para>The file that will contain the encrypted log entries from the supplied plain text log file after encryption.</para>
          </listitem>
        </varlistentry>
       </variablelist>
      <varlistentry>
          <term><command>counter</command>
          </term>
          <listitem>
            <para>The current log entry counter of the secure encrypted destination after encryption. 
	    This is required if the log entries to be encrypted will be appended to an existing secure encrypted destination.</para>
          </listitem>
        </varlistentry>
    </refsection>
    <refsection>
      <title>Options</title>
      <variablelist>
        <?dbfo term-width="1.25in"?>
        <varlistentry>
          <term>
           <command>--key-file</command> or <command>-k</command>
          </term>
          <listitem>
            <para>The current host key from the system where the encryption will be performed.</para>
         </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>--mac-file</command> or <command>-m</command>
          </term>
          <listitem>

            <para>The current MAC file from the system where the encryption will be performed.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>--help</command> or <command>-h</command>
          </term>
          <listitem>
            <para>Display a help message.</para>
         </listitem>
        </varlistentry>
       </variablelist>
    </refsection>    
    <refsection>
      <title>Files</title>
      <para>
        <filename>/usr/bin/slogencrypt</filename>
      </para>
      <para>
        <filename>/etc/syslog-ng.conf</filename>
      </para>
    </refsection>
    <refsection>
      <title>See also</title>
      <para>
        <link linkend="syslog-ng.conf.5"><command>syslog-ng.conf</command>(5)</link>
      </para>
      <para>
        <link linkend="secure-logging.7"><command>secure-logging</command>(7)</link>
      </para>
      <note version="5.0">
        <para>For the detailed documentation of  see <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/index.html"><command>The syslog-ng Administrator Guide</command></link></para>
        <para>If you experience any problems or need help with syslog-ng, visit the <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"><command>syslog-ng mailing list</command></link>.</para>
        <para>For news and notifications about of syslog-ng, visit the <link xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="https://syslog-ng.org/blogs/"><command>syslog-ng blogs</command></link>.</para>
        <para>For specific information requests related to secure logging send a mail to the Airbus Secure Logging Team &lt;secure-logging@airbus.com&gt;.</para>
      </note>
    </refsection>
    <refsection version="5.0">
      <title>Author</title>
      <para>This manual page was written by the Airbus Secure Logging Team &lt;secure-logging@airbus.com&gt;.</para>
    </refsection>
    <refsection version="5.0">
      <title>Copyright</title>
    </refsection>
  </refentry>
</reference>
