<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pario TechnoBlob &#187; SSL</title>
	<atom:link href="http://pario.no/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Forte Agent Newsreader in linux with SSL support</title>
		<link>http://pario.no/2009/02/11/using-forte-agent-newsreader-in-linux-with-ssl-support/</link>
		<comments>http://pario.no/2009/02/11/using-forte-agent-newsreader-in-linux-with-ssl-support/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 21:14:00 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[forte agent]]></category>
		<category><![CDATA[newsreader]]></category>
		<category><![CDATA[NNTP]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[stunnel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://pario.no/?p=1420</guid>
		<description><![CDATA[This post describes how you can connect to a NNTP news servers that provides SSL support with your Forte Agent Newsreader version 6.0 under Ubuntu linux. I assume you know how to install Forte Agent in linux or access it from a Windows partition and will not describe that in this post. Installing wine # [...]]]></description>
			<content:encoded><![CDATA[<p>This post describes how you can connect to a NNTP news servers that provides SSL support with your Forte Agent Newsreader version 6.0 under Ubuntu linux.<br />
I assume you know how to install Forte Agent in linux or access it from a Windows partition and will not describe that in this post.</p>
<p><strong>Installing wine</strong></p>
<pre>
# sudo aptitude install wine</pre>
<p>Always install the newest Wine version available.</p>
<p><strong>Start Forte Agent using wine</strong></p>
<pre>
# wine agent.exe</pre>
<p>I assume you know where you have placed the Forte Agent files.</p>
<p>In Windows Forte Agent uses Internet Explorers DLLs to implement SSL support and that is not available in linux.<br />
If you try to run Forte Agent with the Server Setting &#8220;The server requires a secure connection SSL&#8221; you will get a error message </p>
<pre>
Failed: Unknown exception msg=2 type=2</pre>
<p>One solution is to use the linux command stunnel to create a SSL tunnel from your PC to the news server you want to connect to.</p>
<p><strong>Install stunnel for the SSL support</strong></p>
<pre>
# sudo aptitude install stunnel</pre>
<p>Then you set up the stunnel tunnel from your PC to the nntp news server</p>
<pre>
# sudo stunnel  -c -d 127.0.0.1:563 -r nntpnews.servername:563</pre>
<p>This command makes it possible to connect your Forte Agent newsreader to IP address 127.0.0.1 port 563 and all those requests will be forwarded to your newsservers port 563. The port number is just to change if it your news provider uses another port.</p>
<p>Now, in Forte Agent you have to go to the &#8220;Servers and Accounts&#8221;, &#8220;Advanced Settings&#8230;&#8221; and check the checkbox &#8220;Use a non-standard NNTP port&#8221; and write in the port you are using. In my example it is port 563.</p>
<p>You are now ready to connect to your news provider with a SSL tunnel while using Forte Agent Newsreader.<br />
Enjoy safe news reading.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMDIvMTEvdXNpbmctZm9ydGUtYWdlbnQtbmV3c3JlYWRlci1pbi1saW51eC13aXRoLXNzbC1zdXBwb3J0Lzx3cHRiPlVzaW5nIEZvcnRlIEFnZW50IE5ld3NyZWFkZXIgaW4gbGludXggd2l0aCBTU0wgc3VwcG9ydDx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/02/11/using-forte-agent-newsreader-in-linux-with-ssl-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable secure / https SSL login on mediaWiki 1.13.3</title>
		<link>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/</link>
		<comments>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 16:05:22 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://pario.no/?p=953</guid>
		<description><![CDATA[This is how I&#8217;ve enabled secure SSL login through https on a mediaWiki 1.13.3 installation. This description might work on other versions of mediaWiki, but that has not been tested. mediWiki doesn&#8217;t support SSL login out of the box so a little hack has to be performed. First you need to tell the webserver, in [...]]]></description>
			<content:encoded><![CDATA[<p>This is how I&#8217;ve enabled secure SSL login through https on a mediaWiki 1.13.3 installation. This description might work on other versions of mediaWiki, but that has not been tested.<br />
mediWiki doesn&#8217;t support SSL login out of the box so a little hack has to be performed.</p>
<p>First you need to tell the webserver, in my case my Apache server that mediaWiki login requests should be redirected to the SSL page<br />
Add the following code lines to your Apache config files or the mediaWiki .htaccess file</p>
<p><strong>Rewrite login url to use httpsRewriteEngine On</strong></p>
<pre>RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} ^title=Special:UserLogin
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R]</pre>
<p><strong>Rewrite non login url to use normal http</strong></p>
<pre>RewriteEngine On
RewriteCond %{QUERY_STRING} ^(?!title=Special:Userlogin)
RewriteRule ^(.*)$ http://%{SERVER_NAME}$1 [R]</pre>
<p>Source: <a href="http://wiki.epfl.ch/cfavi/mediawiki">http://wiki.epfl.ch/cfavi/mediawiki</a></p>
<p>In addition to the above configuration you have to create a PHP script to fix some cookies problems since the cookie was made on an https address but normal surfing is done on http mode.</p>
<p>Create a file named <strong>ssl_login.php</strong> and insert the following code into it</p>
<pre>
# Secure the login page.

# Secure cookies hurt us because they are set on the https page
# but inaccessible from the http page, so we lose our previous session.
$wgCookieSecure = false;

# Don't process JavaScript and CSS files.
# Otherwise, a secure page will be tagged as "partially secure" because these
# files are being hit via http.
if (checkQS('gen', 'js')) {return;}
if (checkQS('gen', 'css') || checkQS('ctype', 'text/css')) {return;}

# Get page title from query string.
$pageTitle = array_key_exists('title', $_GET)
     ? $_GET['title']
     : "";

# Get server variables
$domain = $_SERVER['HTTP_HOST'];
$uri = $_SERVER['REQUEST_URI'];

# Are we on the sign-in page or not?
# Logic works for everything except Special pages which apparently don't
# even run LocalSettings.php.
$onSignInPage = false;
$signInPageName = 'special:userlogin';  // lowercase on purpose
if ( strtolower($pageTitle) == $signInPageName ) {
  $onSignInPage = true;
} elseif ( strstr(strtolower($uri), "/$signInPageName") ) {
  $onSignInPage = true;
} else {
  $onSignInPage = false;
}

# Secure only the Special:Userlogin page.
# Un-secure all other pages.
if ( !checkServerVariable('HTTPS', 'on') &amp;&amp; $onSignInPage ) {
  header('Location: https://' . $domain . $uri);
} elseif ( checkServerVariable('HTTPS', 'on') &amp;&amp; ! $onSignInPage ) {
  header('Location: http://' . $domain . $uri);
} else {
  // nothing
}

function checkQS($key, $value) {
  return checkArrayValue($_GET, $key, $value);
}

function checkServerVariable($var, $value) {
  return checkArrayValue($_SERVER, $var, $value);
}

function checkArrayValue($arr, $key, $value) {
  return array_key_exists($key, $arr) &amp;&amp; $arr[$key] == $value;
}</pre>
<p>Include this file in your <strong>LocalSettings.php</strong> file like this</p>
<pre># Fix to use SSL login
include '/full/path/to/htdocs/ssl_login.php';</pre>
<p><strong>Source:</strong> <a href="http://www.mediawiki.org/wiki/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only">http://www.mediawiki.org/wiki/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only</a></p>
<p>Remember to restart your apache webserver to see the changes.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/wiki.epfl.ch\/cfavi\/mediawiki","http:\/\/www.mediawiki.org\/wiki\/Manual:Configuration_tips_and_tricks#HTTPS_on_Login_only"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDkvMDEvMzAvZW5hYmxlLXNlY3VyZS1zc2wtbG9naW4tb24tbWVkaWF3aWtpLzx3cHRiPkVuYWJsZSBzZWN1cmUgLyBodHRwcyBTU0wgbG9naW4gb24gbWVkaWFXaWtpIDEuMTMuMzx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2009/01/30/enable-secure-ssl-login-on-mediawiki/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Setting up an SSL server with Apache2 on Debian</title>
		<link>http://pario.no/2007/09/09/setting-up-an-ssl-server-with-apache2-on-debian/</link>
		<comments>http://pario.no/2007/09/09/setting-up-an-ssl-server-with-apache2-on-debian/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 21:04:39 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[a2enmod]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[virtual domains]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/09/09/setting-up-an-ssl-server-with-apache2-on-debian/</guid>
		<description><![CDATA[With the introduction of the Apache2 packages in Debian it is much simpler to create and use a secure SSL protected webserver than in the old days with Apache 1.3, here we&#8217;ll show how it is done. If you have Apache 2.x installed already then you&#8217;re good to go as you don&#8217;t need anything extra [...]]]></description>
			<content:encoded><![CDATA[<p>With the introduction of the Apache2 packages in Debian it is much simpler to create and use a secure SSL protected webserver than in the old days with Apache 1.3, here we&#8217;ll show how it is done. If you have Apache 2.x installed already then you&#8217;re good to go as you don&#8217;t need anything extra installed.</p>
<p>If you haven&#8217;t got it installed then you can do so easily:</p>
<pre>earth:~# apt-get install apache2
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  apache2-common apache2-mpm-worker apache2-utils openssl ssl-cert
Suggested packages:
  apache2-doc ca-certificates
The following NEW packages will be installed:
  apache2 apache2-common apache2-mpm-worker apache2-utils openssl ssl-cert
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 2040kB of archives.
After unpacking 6218kB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>
<p>Once the server is installed you need to do three things to get a working SSL setup:</p>
<ol>
<li>Generate, or import, a certificate.</li>
<li>Enable Apaches SSL support.</li>
<li>Configure your SSL options.</li>
</ol>
<p><strong>Generating A Certificate</strong></p>
<p>Generating a certificate from scratch will give you something which will be used to protect the traffic exchanged between clients and your server, however it will be unsigned by a trusted certificate authority so it will generate warnings.</p>
<p>Importing a paid and &#8220;trusted&#8221; certificate will avoid this problem, but that is beyond the scope of this simple introduction.</p>
<p>Generating an SSL certificate for Apache2 may be accomplished using the <tt>apache2-ssl-certificate</tt> script.  This will ask you questions interactively then generate the certificate file appropriately.</p>
<p>Here&#8217;s a sample session:</p>
<pre>earth:~# apache2-ssl-certificate

creating selfsigned certificate
replace it with one signed by a certification authority (CA)

enter your ServerName at the Common Name prompt

If you want your certificate to expire after x days call this programm
with -days x
Generating a 1024 bit RSA private key
............++++++
..........................++++++
writing new private key to '/etc/apache2/ssl/apache.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:
State or Province Name (full name) [Some-State]:Scotland
Locality Name (eg, city) []:Edinburgh
Organization Name (eg, company; recommended) []:Steve Kemp
Organizational Unit Name (eg, section) []:
server name (eg. ssl.domain.tld; required!!!) []:earth
Email Address []: earth-admin@steve.org.uk</pre>
<p><strong>Enabling SSL Support</strong></p>
<p>To use the SSL facilities of Apache2 you must enable the module <tt>mod_ssl</tt>, this can be achieved using the helper tool <tt>a2enmod</tt> (We&#8217;ve previously <a href="http://www.debian-administration.org/articles/207">discussed the Apache2 helper scripts</a>.)</p>
<p>As root run:</p>
<pre>earth:~# a2enmod ssl
Module ssl installed; run /etc/init.d/apache2 force-reload to enable.</pre>
<p>Once this is done you&#8217;ll have Apache setup to accept SSL connections, but the server will still only be listening for incoming HTTP requests on port 80 &#8211; and not SSL connections on port 443. To fix this you must add a line to the file <tt>/etc/apache2/ports.conf</tt>:</p>
<pre>Listen 443</pre>
<p>With these two steps out of the way you now have an Apache setup which will listen for and accept SSL connections. The next step is to modify your virtualhosts to use it.</p>
<p><strong>Configuring your SSL Hosts</strong></p>
<p>With a certificate setup, and the server updated to load and listen for incoming SSL connections you&#8217;re almost finished. The final step is to ensure that your virtual hosts, or main host, will accept SSL options.</p>
<p>I use virtual hosts upon my machine and this just means adding a couple of options to each one I wish to use SSL:</p>
<pre>SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem</pre>
<p>For reference here is a complete example which should be easy to modify/understand:</p>
<pre>NameVirtualHost *:443
NameVirtualHost *:80

&lt;VirtualHost *:80&gt;
        ServerName earth.my.flat
        DocumentRoot /var/www/
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined
&lt;/VirtualHost&gt;

&lt;VirtualHost *:443&gt;
        ServerName earth.my.flat

        DocumentRoot /var/www/
        ErrorLog /var/log/apache2/error.log
        CustomLog /var/log/apache2/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/apache.pem
&lt;/VirtualHost&gt;</pre>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.debian-administration.org\/articles\/207"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDkvMDkvc2V0dGluZy11cC1hbi1zc2wtc2VydmVyLXdpdGgtYXBhY2hlMi1vbi1kZWJpYW4vPHdwdGI%2BU2V0dGluZyB1cCBhbiBTU0wgc2VydmVyIHdpdGggQXBhY2hlMiBvbiBEZWJpYW48d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/09/09/setting-up-an-ssl-server-with-apache2-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generering av SSL sertificat</title>
		<link>http://pario.no/2007/05/18/generering-av-ssl-sertificat/</link>
		<comments>http://pario.no/2007/05/18/generering-av-ssl-sertificat/#comments</comments>
		<pubDate>Fri, 18 May 2007 00:30:12 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Courier-imap]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/05/18/generering-av-ssl-sertificat/</guid>
		<description><![CDATA[Dovecot og Courier-imap klager til tider på at sertifikat ikke fungerer. Da kan man kjøre følgende kommando for å lage nytt sertifikat. Kommandoen kjøres fra /etc/ssl/dovecot/ openssl req -new -x509 -nodes -days 365 -out cert.crt -keyout cert.key cat cert.key cert.crt &#62; cert.pem Endre navnet på filene slik at de stemmer overns med configfilene til de [...]]]></description>
			<content:encoded><![CDATA[<p>Dovecot og Courier-imap klager til tider på at sertifikat ikke fungerer. Da kan man kjøre følgende kommando for å lage nytt sertifikat. Kommandoen kjøres fra <strong>/etc/ssl/dovecot/</strong></p>
<pre>
openssl req -new -x509 -nodes -days 365 -out cert.crt -keyout cert.key
cat cert.key cert.crt &gt; cert.pem</pre>
<p>Endre navnet på filene slik at de stemmer overns med configfilene til de respektive programmene.</p>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDUvMTgvZ2VuZXJlcmluZy1hdi1zc2wtc2VydGlmaWNhdC88d3B0Yj5HZW5lcmVyaW5nIGF2IFNTTCBzZXJ0aWZpY2F0PHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/05/18/generering-av-ssl-sertificat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

