<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://criu.org/index.php?action=history&amp;feed=atom&amp;title=TLS</id>
	<title>TLS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://criu.org/index.php?action=history&amp;feed=atom&amp;title=TLS"/>
	<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=TLS&amp;action=history"/>
	<updated>2026-05-13T18:54:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://criu.org/index.php?title=TLS&amp;diff=4946&amp;oldid=prev</id>
		<title>Radostin: /* Debugging */</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=TLS&amp;diff=4946&amp;oldid=prev"/>
		<updated>2019-09-07T17:56:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Debugging&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:56, 7 September 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l137&quot; &gt;Line 137:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 137:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Debugging ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Debugging ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In cases when things &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;do not &lt;/del&gt;go as expected &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;further information to assist debugging can be obtained by setting &lt;/del&gt;the environment variable &amp;lt;code&amp;gt;GNUTLS_DEBUG_LEVEL&amp;lt;/code&amp;gt; to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;an appropriate &lt;/del&gt;log level. The &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;level is &lt;/del&gt;an integer between 0 and 9 (higher values &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mean &lt;/del&gt;more verbosity).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In cases when things &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;don't &lt;/ins&gt;go as expected the environment variable &amp;lt;code&amp;gt;GNUTLS_DEBUG_LEVEL&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;can be used &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;set the GnuTLS &lt;/ins&gt;log level. The &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;value should be &lt;/ins&gt;an integer between 0 and 9 (higher values &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;= &lt;/ins&gt;more verbosity).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Radostin</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=TLS&amp;diff=4925&amp;oldid=prev</id>
		<title>Radostin: Add comment about debugging</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=TLS&amp;diff=4925&amp;oldid=prev"/>
		<updated>2019-06-13T10:11:48Z</updated>

		<summary type="html">&lt;p&gt;Add comment about debugging&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:11, 13 June 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l134&quot; &gt;Line 134:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[dst]# criu restore -D &amp;lt;PATH&amp;gt; --lazy-pages&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[dst]# criu restore -D &amp;lt;PATH&amp;gt; --lazy-pages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Debugging ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;In cases when things do not go as expected further information to assist debugging can be obtained by setting the environment variable &amp;lt;code&amp;gt;GNUTLS_DEBUG_LEVEL&amp;lt;/code&amp;gt; to an appropriate log level. The level is an integer between 0 and 9 (higher values mean more verbosity).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Radostin</name></author>
	</entry>
	<entry>
		<id>https://criu.org/index.php?title=TLS&amp;diff=4921&amp;oldid=prev</id>
		<title>Radostin: Created page with &quot;This page describes how use the TLS functionality of CRIU. A good introduction to Public Key Infrastructure (PKI) and the Transport Layer Security (TLS) protocol can be found...&quot;</title>
		<link rel="alternate" type="text/html" href="https://criu.org/index.php?title=TLS&amp;diff=4921&amp;oldid=prev"/>
		<updated>2019-06-08T18:46:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This page describes how use the TLS functionality of CRIU. A good introduction to Public Key Infrastructure (PKI) and the Transport Layer Security (TLS) protocol can be found...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page describes how use the TLS functionality of CRIU. A good introduction to Public Key Infrastructure (PKI) and the Transport Layer Security (TLS) protocol can be found in the GnuTLS [https://gnutls.org/manual/gnutls.html manual].&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
CRIU supports an authenticated key exchange using PKI and X.509 certificates to provide encryption and decryption of data transferred via [[page server]].&lt;br /&gt;
&lt;br /&gt;
This functionality is enabled when CRIU is compiled with GnuTLS support. By default, this happens automatically when the development files for the &amp;lt;code&amp;gt;gnutls&amp;lt;/code&amp;gt; package are installed. However, this can be disabled by setting the &amp;lt;code&amp;gt;NO_GNUTLS&amp;lt;/code&amp;gt; environment variable at build time.&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
&lt;br /&gt;
The default PKI paths are listed in the table below. These locations can be overwritten by the corresponding command-line options.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Default path'''&lt;br /&gt;
|'''CLI option'''&lt;br /&gt;
|-&lt;br /&gt;
|Certificate authority certificate&lt;br /&gt;
|&amp;lt;code&amp;gt;/etc/pki/CA/cacert.pem&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;--tls-cacert&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|Certificate revocation list&lt;br /&gt;
|&amp;lt;code&amp;gt;/etc/pki/CA/cacrl.pem&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;--tls-cacrl&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|*Client/server certificate&lt;br /&gt;
|&amp;lt;code&amp;gt;/etc/pki/criu/cert.pem&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;--tls-cert&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|*Private key&lt;br /&gt;
|&amp;lt;code&amp;gt;/etc/pki/criu/private/key.pem&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;--tls-key&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{{note|Required files are indicated with an asterisk (*). If GnuTLS fails to load a required or file specified file via command-line option CRIU will exit with an error.}}&lt;br /&gt;
&lt;br /&gt;
X.509 certificates and private keys can be generated parsed with the [https://www.gnutls.org/manual/html_node/certtool-Invocation.html &amp;lt;code&amp;gt;certtool&amp;lt;/code&amp;gt;]. A [https://www.gnutls.org/manual/html_node/certtool-Invocation.html#Certtool_0027s-template-file-format template file] can be used to avoid the interactive questions of this tool.&lt;br /&gt;
&lt;br /&gt;
=== Generate Certificate Authority certificate ===&lt;br /&gt;
1. Create a template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt; ca_template.info &amp;lt;&amp;lt;-EOF&lt;br /&gt;
cn = criu.org&lt;br /&gt;
ca&lt;br /&gt;
cert_signing_key&lt;br /&gt;
expiration_days = 700&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Generate a private key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# (umask 277 &amp;amp;&amp;amp; certtool --generate-privkey &amp;gt; cakey.pem)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Generate the CA certificate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# certtool --generate-self-signed \&lt;br /&gt;
           --template ca_template.info \&lt;br /&gt;
           --load-privkey cakey.pem \&lt;br /&gt;
           --outfile cacert.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generate client/server certificates ===&lt;br /&gt;
&lt;br /&gt;
1. Create a template file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt; server_template.info &amp;lt;&amp;lt;-EOF&lt;br /&gt;
cn = &amp;lt;Host Name&amp;gt;&lt;br /&gt;
encryption_key&lt;br /&gt;
signing_key&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Generate the private key file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# (umask 277 &amp;amp;&amp;amp; certtool --generate-privkey &amp;gt; key.pem)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Generate the certificate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# certtool --generate-certificate \&lt;br /&gt;
            --template server_template.info \&lt;br /&gt;
            --load-privkey key.pem \&lt;br /&gt;
            --load-ca-certificate cacert.pem \&lt;br /&gt;
            --load-ca-privkey cakey.pem \&lt;br /&gt;
            --outfile cert.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generating certificate revocation list ===&lt;br /&gt;
&lt;br /&gt;
Generating a CRL that contains revoked certificates can be achieved as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# certtool --generate-crl \&lt;br /&gt;
           --load-ca-privkey cakey.pem \&lt;br /&gt;
           --load-ca-certificate cacert.pem \&lt;br /&gt;
           --load-certificate revoked-certs.pem \&lt;br /&gt;
           --outfile cacrl.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the &amp;lt;code&amp;gt;revoked-certs.pem&amp;lt;/code&amp;gt; file contains all revoked certificates. If the &amp;lt;code&amp;gt;--load-certificate&amp;lt;/code&amp;gt; is omitted, an empty Certificate Revocation List will be generated.&lt;br /&gt;
&lt;br /&gt;
== Certificate verification ==&lt;br /&gt;
&lt;br /&gt;
The use of a CA certificate and CRL is optional. They are being loaded if present and ignored otherwise. The system's default trusted CAs are used to verify the received client (or server) certificate when the &amp;lt;code&amp;gt;--tls-cacert&amp;lt;/code&amp;gt; option is '''not''' specified.&lt;br /&gt;
&lt;br /&gt;
Both the client and the server are required to send a certificate during the TLS handshake phase.&lt;br /&gt;
&lt;br /&gt;
The [https://gnutls.org/manual/html_node/Priority-Strings.html priority string] for the TLS session's handshake algorithms and options (ciphers, key exchange methods and MACs) is set to default.&lt;br /&gt;
&lt;br /&gt;
The value specified with the [[CLI/opt/--address]] option is expected to match the hostname included in the received certificate. This implies that, for example, if an IP address is used to connect to a server and the server's certificate includes it's domain name, the verification will fail. This feature is very important to mitigate MITM attacks, however, it can be disabled with the &amp;lt;code&amp;gt;--tls-no-cn-verify&amp;lt;/code&amp;gt; command-line option.&lt;br /&gt;
&lt;br /&gt;
== Usage Example ==&lt;br /&gt;
&lt;br /&gt;
=== Page-server ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[dst]# criu page-server -D &amp;lt;path&amp;gt; --port &amp;lt;port&amp;gt; --tls&lt;br /&gt;
&lt;br /&gt;
[src]# criu dump --page-server --address &amp;lt;dst&amp;gt; --port &amp;lt;port&amp;gt; -t &amp;lt;pid&amp;gt; -D &amp;lt;path&amp;gt; --tls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lazy migration ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[src]# criu dump --lazy-pages --port &amp;lt;port&amp;gt; -t &amp;lt;pid&amp;gt; -D &amp;lt;path&amp;gt; --tls&lt;br /&gt;
&lt;br /&gt;
[dst]# criu lazy-pages --page-server --address &amp;lt;src&amp;gt; --port &amp;lt;port&amp;gt; -D &amp;lt;path&amp;gt; --tls&lt;br /&gt;
&lt;br /&gt;
[dst]# criu restore -D &amp;lt;PATH&amp;gt; --lazy-pages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Radostin</name></author>
	</entry>
</feed>