<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>tutorial | Craig Hesling</title><link>https://new.craighesling.com/tag/tutorial/</link><atom:link href="https://new.craighesling.com/tag/tutorial/index.xml" rel="self" type="application/rss+xml"/><description>tutorial</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Sat, 13 Oct 2018 00:00:00 +0000</lastBuildDate><image><url>https://new.craighesling.com/media/icon_hud2fdbe3c21f96e183bc7961971f91459_788_512x512_fill_lanczos_center_3.png</url><title>tutorial</title><link>https://new.craighesling.com/tag/tutorial/</link></image><item><title>Let's Encrypt Root CA Cert</title><link>https://new.craighesling.com/post/lets-encrypt-root-ca/</link><pubDate>Sat, 13 Oct 2018 00:00:00 +0000</pubDate><guid>https://new.craighesling.com/post/lets-encrypt-root-ca/</guid><description>&lt;h2 id="overview--explination">Overview / Explination&lt;/h2>
&lt;p>Since Let&amp;rsquo;s Encrypt&amp;rsquo;s own root certificate authority, &lt;code>ISRG Root X1&lt;/code>, is still quite new and not commonly trusted.
To get around this issue, Let&amp;rsquo;s Encrypt&amp;rsquo;s intermediate has be graciously cross-signed by IdentTrust&amp;rsquo;s root certificate authority &lt;code>DST Root CA X3&lt;/code>, which is commonly trusted by clients.&lt;/p>
&lt;p>What this means is that most certificates issued by Let&amp;rsquo;s Encrypt have an origin of trust from IdentTrust&amp;rsquo;s root CA.&lt;/p>
&lt;p>Take for example the OpenChirp MQTT server. We can use &lt;code>openssl s_client&lt;/code> to inspect the certificate presented to the user.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">openssl s_client -connect mqtt.openchirp.io:8883
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">verify return:1
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">depth=1 C = US, O = Let&amp;#39;s Encrypt, CN = Let&amp;#39;s Encrypt Authority X3
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">verify return:1
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">depth=0 CN = mqtt.openchirp.io
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">verify return:1
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">---
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Certificate chain
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> 0 s:/CN=mqtt.openchirp.io
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> i:/C=US/O=Let&amp;#39;s Encrypt/CN=Let&amp;#39;s Encrypt Authority X3
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> 1 s:/C=US/O=Let&amp;#39;s Encrypt/CN=Let&amp;#39;s Encrypt Authority X3
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> i:/O=Digital Signature Trust Co./CN=DST Root CA X3
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">---
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The beginning of the output shows the root is &lt;code>CN = DST Root CA X3&lt;/code>, which doesn&amp;rsquo;t look like Let&amp;rsquo;s Encrypt&amp;rsquo;s own &lt;code>ISRG Root X1&lt;/code>.&lt;/p>
&lt;p>So, if you need to present the root CA cert to some program (for verification), you need to present IdentTrust&amp;rsquo;s root CA cert. See the next section to learn how to grab a usable x509 PEM formatted cert.&lt;/p>
&lt;h2 id="grab-cert-and-convert">Grab Cert and Convert&lt;/h2>
&lt;p>If we want to present the trusted root CA cert for a Let&amp;rsquo;s Encrypt issued certificate, we need to present the IdentTrust root CA cert. More specifically, we need to reference the &lt;code>TrustID X3&lt;/code> root cert.
The only problem with this is that IdentTrust only offers their certificate in PKCS7 binary format (&lt;code>.p7b&lt;/code>), which is unusable in a lot of reasonable applications. We need x509 PEM format.&lt;/p>
&lt;p>The following instructions will show how to compose the x509 &lt;code>.pem&lt;/code> file for the &lt;code>DST Root CA X3&lt;/code> cert.&lt;/p>
&lt;h3 id="tldr">TLDR&lt;/h3>
&lt;p>At the time of writing this, the following wget line was capable of grabbing the &lt;code>TrustID X3&lt;/code> cert in p7b format.
The next openssl would convert that &lt;code>.p7b&lt;/code> file to an x509 &lt;code>.pem&lt;/code> file for normal use.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">wget https://www.identrust.com/node/935 -O trustidrootx3_chain.p7b
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">openssl pkcs7 -inform DER -in trustidrootx3_chain.p7b -print_certs -outform PEM -out trustidrootx3_chain.pem
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can then use the &lt;code>trustidrootx3_chain.pem&lt;/code> as the CAfile parameter of client programs.&lt;/p>
&lt;h3 id="fallback-instructions">Fallback Instructions&lt;/h3>
&lt;p>If the above commands failed, you can download the PKCS7 binary file (&lt;code>.p7b&lt;/code>) file from the IdentTrust &lt;a href="https://www.identrust.com/support/downloads" target="_blank" rel="noopener">download page&lt;/a> bellow.&lt;/p>
&lt;p>To convert that PKCS7 binary file to x509 PEM, use the following openssl command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">openssl pkcs7 -inform DER -in &amp;lt;THE_DOWNLOADED_P7B_CERT&amp;gt; -print_certs -outform PEM -out trustidrootx3_chain.pem
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can then use the &lt;code>trustidrootx3_chain.pem&lt;/code> as the CAfile parameter of client programs.&lt;/p>
&lt;h2 id="example-usage-of-x509-pem">Example Usage of x509 PEM&lt;/h2>
&lt;h3 id="mosquitto-client">Mosquitto Client&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">mosquitto_sub -v -i monitor&lt;span class="nv">$RANDOM&lt;/span> -h mqtt.openchirp.io -p &lt;span class="m">8883&lt;/span> --cafile ./trustidrootx3_chain.pem -u &amp;lt;USER&amp;gt; -p &amp;lt;TOKEN&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="links">Links&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://letsencrypt.org/certificates/" target="_blank" rel="noopener">Let&amp;rsquo;s Encrypt Certificates and Explination&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.identrust.com/support/downloads" target="_blank" rel="noopener">IdentTrust Download&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Regenerate Chrome App/Extension Desktop Shortcuts</title><link>https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/</link><pubDate>Wed, 20 Dec 2017 11:30:41 -0500</pubDate><guid>https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/</guid><description>&lt;details class="toc-inpage d-print-none " open>
&lt;summary class="font-weight-bold">Table of Contents&lt;/summary>
&lt;nav id="TableOfContents">
&lt;ul>
&lt;li>&lt;a href="#description">Description&lt;/a>&lt;/li>
&lt;li>&lt;a href="#here-is-how-to-fix-it">Here is how to fix it&lt;/a>
&lt;ul>
&lt;li>&lt;a href="#method-1">Method 1&lt;/a>&lt;/li>
&lt;li>&lt;a href="#method-2">Method 2&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/nav>
&lt;/details>
&lt;h2 id="description">Description&lt;/h2>
&lt;p>This is a quick how-to for regenerating the &lt;code>.desktop&lt;/code> shortcuts
associated with Google Chrome Apps or Extensions.&lt;/p>
&lt;details class="spoiler " id="spoiler-1">
&lt;summary>Rant&lt;/summary>
&lt;p>&lt;p>Being able to launch your favorite Chrome App/Extension straight
from your desktop manager&amp;rsquo;s launcher is a big win in my book.
My typical go-to is Google Keep. With my Gnome Shell setup, all I
have to do is hit the &lt;code>Super&lt;/code> key on my keyboard to bring up the
searchable Gnome launcher, ever so slightly start typing &lt;code>k&lt;/code> &lt;code>e&lt;/code> &lt;code>e&lt;/code> &lt;code>p&lt;/code>,
and pound the enter key. &lt;em>Presto&lt;/em>, I&amp;rsquo;m in my notes taking app.&lt;/p>
&lt;p>Every once in a while, a desktop shortcut disappears
(possibly self inflicted) or becomes corrupt.
The monotony of traversing through Chrome, to the Apps menu,
and clicking on the correct App/Extension tile haunts me to this day.&lt;/p>
&lt;p>This article is needed due to the dearth of information
related to Chrome Extension desktop shortcuts for Linux
desktop environments. I also needed a good tutorial to kickoff my Posts section.&lt;/p>
&lt;/p>
&lt;/details>
&lt;h2 id="here-is-how-to-fix-it">Here is how to fix it&lt;/h2>
&lt;h3 id="method-1">Method 1&lt;/h3>
&lt;ol>
&lt;li>Go to the All Apps page.
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="All apps" srcset="
/post/chrome-app-extension-desktop-shortcut/all-apps-menu-launcher_hu82f108345a474bb3c3cadc90be7606ee_1018_362ae99b347a562a126643fbafdd20a3.webp 400w,
/post/chrome-app-extension-desktop-shortcut/all-apps-menu-launcher_hu82f108345a474bb3c3cadc90be7606ee_1018_1551056afcee80194757d69d39d950cb.webp 760w,
/post/chrome-app-extension-desktop-shortcut/all-apps-menu-launcher_hu82f108345a474bb3c3cadc90be7606ee_1018_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/all-apps-menu-launcher_hu82f108345a474bb3c3cadc90be7606ee_1018_362ae99b347a562a126643fbafdd20a3.webp"
width="69"
height="28"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
This is also the URL &lt;code>chrome://apps&lt;/code>.&lt;/li>
&lt;li>Right click on the App or Extension you wish to regenerate a shortcut for.
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="App right-click menu" srcset="
/post/chrome-app-extension-desktop-shortcut/app-right-click-menu_hub6c3b39d92fc7ee62d1ad816ef758d0b_33658_12789b759a4d261762e6bb1f0a1c5a00.webp 400w,
/post/chrome-app-extension-desktop-shortcut/app-right-click-menu_hub6c3b39d92fc7ee62d1ad816ef758d0b_33658_469a63b2745f3802c89d33f1cd3ecb8c.webp 760w,
/post/chrome-app-extension-desktop-shortcut/app-right-click-menu_hub6c3b39d92fc7ee62d1ad816ef758d0b_33658_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/app-right-click-menu_hub6c3b39d92fc7ee62d1ad816ef758d0b_33658_12789b759a4d261762e6bb1f0a1c5a00.webp"
width="481"
height="481"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;li>Click &lt;code>Create shortcuts...&lt;/code>&lt;/li>
&lt;li>Deselect &lt;code>Desktop&lt;/code>, select &lt;code>Application menu&lt;/code>, and click &lt;code>Create&lt;/code>.
&lt;em>A &lt;code>Desktop&lt;/code> shortcut is pointless when you have Desktop icons disabled in Gnome Shell. [default for Gnome Shell]&lt;/em>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="App Details menu" srcset="
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_3fa38343896cc84f928c4346dfc34a13.webp 400w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_c12fbcf83a86ca1fd5f41b9491d1ad73.webp 760w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_3fa38343896cc84f928c4346dfc34a13.webp"
width="445"
height="245"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;/ol>
&lt;h3 id="method-2">Method 2&lt;/h3>
&lt;ol>
&lt;li>Press the &lt;code>three vertical dots&lt;/code> in the top right of the browser.&lt;/li>
&lt;li>Navigate to &lt;code>More tools&lt;/code> and then &lt;code>Extensions&lt;/code>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Extensions menu" srcset="
/post/chrome-app-extension-desktop-shortcut/extension-menu_hua477484d3daabe2e4562eb49e450ad3e_43007_672b4da89cc8c02d3d55752bf49b9e3e.webp 400w,
/post/chrome-app-extension-desktop-shortcut/extension-menu_hua477484d3daabe2e4562eb49e450ad3e_43007_3ea45ceb534a6c5f4f1f04c5069b34cd.webp 760w,
/post/chrome-app-extension-desktop-shortcut/extension-menu_hua477484d3daabe2e4562eb49e450ad3e_43007_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/extension-menu_hua477484d3daabe2e4562eb49e450ad3e_43007_672b4da89cc8c02d3d55752bf49b9e3e.webp"
width="642"
height="642"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;li>Click the &lt;code>Details&lt;/code> linked text on the App or Extension you wish to regenerate a shortcut for.
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="App Details" srcset="
/post/chrome-app-extension-desktop-shortcut/app-details_hu4e8e07b20272b8e43df386236ad035eb_11431_fddc99990184da264ac2176a45b35da7.webp 400w,
/post/chrome-app-extension-desktop-shortcut/app-details_hu4e8e07b20272b8e43df386236ad035eb_11431_b0bb3b2907d51d879d52ae23725339bf.webp 760w,
/post/chrome-app-extension-desktop-shortcut/app-details_hu4e8e07b20272b8e43df386236ad035eb_11431_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/app-details_hu4e8e07b20272b8e43df386236ad035eb_11431_fddc99990184da264ac2176a45b35da7.webp"
width="229"
height="169"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;li>Click &lt;code>Create shortcuts...&lt;/code>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="App Details menu" srcset="
/post/chrome-app-extension-desktop-shortcut/app-details-menu_hu76bad809ef0df104cb9571677bc851fe_37062_298d4a9165741d8991951f513ecea49a.webp 400w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu_hu76bad809ef0df104cb9571677bc851fe_37062_ee8d72e1ca52ed127ead5a21c26741d7.webp 760w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu_hu76bad809ef0df104cb9571677bc851fe_37062_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/app-details-menu_hu76bad809ef0df104cb9571677bc851fe_37062_298d4a9165741d8991951f513ecea49a.webp"
width="432"
height="560"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;li>Deselect &lt;code>Desktop&lt;/code>, select &lt;code>Application menu&lt;/code>, and click &lt;code>Create&lt;/code>.
&lt;em>A &lt;code>Desktop&lt;/code> shortcut is pointless when you have Desktop icons disabled in Gnome Shell. [default for Gnome Shell]&lt;/em>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="App Details menu" srcset="
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_3fa38343896cc84f928c4346dfc34a13.webp 400w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_c12fbcf83a86ca1fd5f41b9491d1ad73.webp 760w,
/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://new.craighesling.com/post/chrome-app-extension-desktop-shortcut/app-details-menu-create-shortcuts_hu07a0ccf4974fa49d44a915788114ccfc_19427_3fa38343896cc84f928c4346dfc34a13.webp"
width="445"
height="245"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;/ol></description></item></channel></rss>