title: Generating a plaintext SSL certificate for google maps api for use on esp32
body: <h1>Foreword</h1>
  <p>I don't know that much about https and SSL, so I may use the wrong wordage for certain things but bear with me I've done as much research as I have the energy for</p>
  <h1>Goal:</h1>
  <p>I am trying to use the <a href="https://developers.google.com/maps/documentation/geolocation/overview" rel="nofollow noreferrer">geolocate</a> feature of the google maps API on my esp32 wroom-1, but this API requires an https connection, I have seen in other online examples using this <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFi.h" rel="nofollow noreferrer">wifi library</a> with this <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/HTTPClient/src/HTTPClient.h" rel="nofollow noreferrer">http library</a> and passing their SSL certificate as a plaintext string as the second parameter to the <code>http.begin()</code> function. The example that I seen used a plaintext SSL certificate in this format:</p>
  <pre class="lang-cpp prettyprint-override"><code>const char* root_ca= \
  &quot;-----BEGIN CERTIFICATE-----\n&quot; \
  &quot;MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL\n&quot; \
  &quot;MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE\n&quot; \
  &quot;BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT\n&quot; \
  &quot;IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw\n&quot; \
  &quot;MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy\n&quot; \
  &quot;ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N\n&quot; \
  &quot;T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv\n&quot; \
  &quot;biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR\n&quot; \
  &quot;FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J\n&quot; \
  &quot;cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW\n&quot; \
  &quot;BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/\n&quot; \
  &quot;BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm\n&quot; \
  &quot;fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv\n&quot; \
  &quot;GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=\n&quot; \
  &quot;-----END CERTIFICATE-----\n&quot;;
  </code></pre>
  <p>And then passed it to the constructor as such: <code>http.begin(url, root_ca);</code></p>
  <h1>The questions:</h1>
  <ol>
  <li>I cannot find any tutorials on how to export an SSL certificate in this plaintext fashion on windows 10 anywhere online, I have been able to export a certificate that I made on windows into private files but they are not the plaintext as seen in the desired result. Is this easily doable with windows 10? If so are there any tutorials or instructions readily available?</li>
  <li>Every place where I could create an SSL certificate asked for a domain, I know this is a realm I could research on my own but could someone who knows more about it explain it to me like I'm 5 with my use case? (i.e. I am using an esp32 arduino, the API I want to contact is google maps, so where should the domain be in this case?)</li>
  </ol>
  <p>Thanks in advance,
  Ozzie</p>