snipt

Ctrl+h for KB shortcuts

Bash

get certificate validity end date

file="/path/to/cert"
openssl x509 -enddate -noout -in "$file"
https://snipt.net/embed/6b8f7fa0414e49696df5002e3239f3cb/
/raw/6b8f7fa0414e49696df5002e3239f3cb/
6b8f7fa0414e49696df5002e3239f3cb
bash
Bash
2
2019-07-19T13:08:44
True
False
False
/api/public/snipt/141376/
get-certificate-validity-end-date
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nv">file</span><span class="o">=</span><span class="s2">&quot;/path/to/cert&quot;</span> </span><span id="L-2"><a name="L-2"></a>openssl x509 -enddate -noout -in <span class="s2">&quot;</span><span class="nv">$file</span><span class="s2">&quot;</span> </span></pre></div> </td></tr></table>
cert, expiration, linux, openssl, x509

Bash

Preventing Git cert error

env GIT_SSL_NO_VERIFY=true git clone https://bitbucket.org/user/repo.git
https://snipt.net/embed/517bc21864aa314d2a7bda5ef5f4f51f/
/raw/517bc21864aa314d2a7bda5ef5f4f51f/
517bc21864aa314d2a7bda5ef5f4f51f
bash
Bash
2
2019-07-19T01:06:36
True
False
False
Nov 23, 2012 at 08:58 AM
/api/public/snipt/50666/
preventing-git-cert-error
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>env <span class="nv">GIT_SSL_NO_VERIFY</span><span class="o">=</span><span class="nb">true</span> git clone https://bitbucket.org/user/repo.git </span></pre></div> </td></tr></table>
cert, git, https, prevent, ssh

Bash

Création d'un certificat SSL autosigné

1
2
3
openssl genrsa -out server.key 1024
openssl req -new -x509 -days 365 -key server.key -out server.crt
openssl x509 -in server.crt -text -noout
https://snipt.net/embed/df70fc641c68772f9d6ec125e8c485d7/
/raw/df70fc641c68772f9d6ec125e8c485d7/
df70fc641c68772f9d6ec125e8c485d7
bash
Bash
3
2019-07-21T04:32:38
True
False
False
/api/public/snipt/4296/
creation-dun-certificat-ssl-autosigne
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>openssl genrsa -out server.key 1024 </span><span id="L-2"><a name="L-2"></a>openssl req -new -x509 -days <span class="m">365</span> -key server.key -out server.crt </span><span id="L-3"><a name="L-3"></a>openssl x509 -in server.crt -text -noout </span></pre></div> </td></tr></table>
cert, certificat, https, openssl, ssl