\documentclass[DIV=12,%
BCOR=0mm,%
headinclude=false,%
footinclude=false,%
fontsize=10pt,%
oneside,%
paper=210mm:11in]%
{scrartcl}
\usepackage[noautomatic]{imakeidx}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{alltt}
\usepackage{verbatim}
\usepackage[shortlabels]{enumitem}
\usepackage{tabularx}
\usepackage[normalem]{ulem}
\def\hsout{\bgroup \ULdepth=-.55ex \ULset}
% https://tex.stackexchange.com/questions/22410/strikethrough-in-section-title
% Unclear if \protect \hsout is needed. Doesn't looks so
\DeclareRobustCommand{\sout}[1]{\texorpdfstring{\hsout{#1}}{#1}}
\usepackage{wrapfig}
% avoid breakage on multiple
and avoid the next [] to be eaten
\newcommand*{\forcelinebreak}{\strut\\*{}}
\newcommand*{\hairline}{%
\bigskip%
\noindent \hrulefill%
\bigskip%
}
% reverse indentation for biblio and play
\newenvironment*{amusebiblio}{
\leftskip=\parindent
\parindent=-\parindent
\smallskip
\indent
}{\smallskip}
\newenvironment*{amuseplay}{
\leftskip=\parindent
\parindent=-\parindent
\smallskip
\indent
}{\smallskip}
\newcommand*{\Slash}{\slash\hspace{0pt}}
% http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\PassOptionsToPackage{hyphens}{url}\usepackage[hyperfootnotes=false,hidelinks,breaklinks=true]{hyperref}
\usepackage{bookmark}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setmainfont{cmunrm.otf}[Script=Latin,%
Ligatures=TeX,%
Path=/home/wiki/.fonts/cm-unicode/,%
BoldFont=cmunbx.otf,%
BoldItalicFont=cmunbi.otf,%
ItalicFont=cmunti.otf]
\setmonofont{cmuntt.otf}[Script=Latin,%
Ligatures=TeX,%
Scale=MatchLowercase,%
Path=/home/wiki/.fonts/cm-unicode/,%
BoldFont=cmuntb.otf,%
BoldItalicFont=cmuntx.otf,%
ItalicFont=cmunit.otf]
\setsansfont{cmunss.otf}[Script=Latin,%
Ligatures=TeX,%
Scale=MatchLowercase,%
Path=/home/wiki/.fonts/cm-unicode/,%
BoldFont=cmunsx.otf,%
BoldItalicFont=cmunso.otf,%
ItalicFont=cmunsi.otf]
\newfontfamily\englishfont{cmunrm.otf}[Script=Latin,%
Ligatures=TeX,%
Path=/home/wiki/.fonts/cm-unicode/,%
BoldFont=cmunbx.otf,%
BoldItalicFont=cmunbi.otf,%
ItalicFont=cmunti.otf]
\let\chapter\section
% global style
\pagestyle{plain}
\usepackage{indentfirst}
% remove the numbering
\setcounter{secnumdepth}{-2}
% remove labels from the captions
\renewcommand*{\captionformat}{}
\renewcommand*{\figureformat}{}
\renewcommand*{\tableformat}{}
\KOMAoption{captions}{belowfigure,nooneline}
\addtokomafont{caption}{\centering}
\deffootnote[3em]{0em}{4em}{\textsuperscript{\thefootnotemark}~}
\addtokomafont{disposition}{\rmfamily}
\addtokomafont{descriptionlabel}{\rmfamily}
\frenchspacing
% avoid vertical glue
\raggedbottom
% this will generate overfull boxes, so we need to set a tolerance
% \pretolerance=1000
% pretolerance is what is accepted for a paragraph without
% hyphenation, so it makes sense to be strict here and let the user
% accept tweak the tolerance instead.
\tolerance=200
% Additional tolerance for bad paragraphs only
\setlength{\emergencystretch}{30pt}
% (try to) forbid widows/orphans
\clubpenalty=10000
\widowpenalty=10000
% given that we said footinclude=false, this should be safe
\setlength{\footskip}{2\baselineskip}
\title{OpenSSL Usage}
\date{}
\author{Stefan Hornburg (Racke)}
\subtitle{}
% https://groups.google.com/d/topic/comp.text.tex/6fYmcVMbSbQ/discussion
\hypersetup{%
pdfencoding=auto,
pdftitle={OpenSSL Usage},%
pdfauthor={Stefan Hornburg (Racke)},%
pdfsubject={},%
pdfkeywords={blog; OpenSSL}%
}
\begin{document}
\thispagestyle{empty}
\strut\vskip 2em
\begin{center}
{\usekomafont{title}{\huge OpenSSL Usage\par}}%
\vskip 1em
\vskip 2em
{\usekomafont{author}{Stefan Hornburg (Racke)\par}}%
\vskip 1.5em
\strut\par
\end{center}
\vskip 3em
\par
Useful site with SSL commands, CSR and certificate decoder:
\href{https://redkestrel.co.uk/articles/openssl-commands/}{\texttt{https://redkestrel.co.uk/articles/openssl-commands/}}
Display certificate request:
\begin{alltt}
openssl req -noout -text -in /etc/apache2/ssl/server2016.csr
\end{alltt}
Display to whom it was issued from PEM file:
\begin{alltt}
openssl x509 -noout -in imapd.pem -subject
\end{alltt}
Display certificate:
\begin{alltt}
openssl x509 -noout -text -in /etc/apache2/ssl/server2016.crt
\end{alltt}
Create key:
\begin{alltt}
openssl genrsa 2048 > www.linuxia.de.key
\end{alltt}
Create certificate request from existing key (SHA2):
\begin{alltt}
openssl req -new -key www.linuxia.de.key -sha256 -out server2016.csr
\end{alltt}
Create certificate request from existing certificate and key:
\begin{alltt}
openssl x509 -x509toreq -in www.linuxia.de.crt -out www.linuxia.de.csr
-signkey www.linuxia.de.key
\end{alltt}
Show public key information:
\begin{alltt}
openssl rsa -in www.linuxia.de.key -pubout
\end{alltt}
Test SSL connection and print out SSL certificate:
\begin{alltt}
openssl s\_client -connect 192.168.26.241:443
\end{alltt}
Connect to SMTP server with STARTTLS:
\begin{alltt}
openssl s\_client -connect 192.168.26.241:25 --starttls smtp
\end{alltt}
For more information, check the \href{http://www.madboa.com/geek/openssl/}{OpenSSL Command-Line HOWTO}.
% begin final page
\clearpage
% new page for the colophon
\thispagestyle{empty}
\begin{center}
Linuxia Wiki
\strut
\end{center}
\strut
\vfill
\begin{center}
Stefan Hornburg (Racke)
OpenSSL Usage
\bigskip
\bigskip
\textbf{wiki.linuxia.de}
\end{center}
% end final page with colophon
\end{document}
% No format ID passed.