Does HTTPS GET and POST requests using the onboard cellular radio.

Dependencies:   mbed mtsas

Committer:
mfiore
Date:
Fri Feb 26 16:44:40 2016 +0000
Revision:
1:26b8af61d0ac
Parent:
0:6ce1803b7a03
Updated mbed library to revision 112, disable regulator's battery charger

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfiore 0:6ce1803b7a03 1 /** Getting the root certificate for a server.
mfiore 0:6ce1803b7a03 2 *
mfiore 0:6ce1803b7a03 3 * This file currently contains root certificates for httpbin.org and google.com
mfiore 0:6ce1803b7a03 4 * To get the root certificate for any given server, follow these steps:
mfiore 0:6ce1803b7a03 5 * - navigate your browser to https://www.fairssl.se/en/ssltest
mfiore 0:6ce1803b7a03 6 * - enter the address of the server you want your Dragonfly to make requests against (e.g. httpbin.org)
mfiore 0:6ce1803b7a03 7 * - click the "Check SSL" button
mfiore 0:6ce1803b7a03 8 * - scroll down to the end of the certificate list - the bottom certificate will probably have "root" in its name
mfiore 0:6ce1803b7a03 9 * - click the [Click here to download the public part of this certificate] button and save the certificate
mfiore 0:6ce1803b7a03 10 * - replace the certificate in this header with your new certificate or just add it - make sure each line is in quotes and ends with a \r\n just like the example
mfiore 0:6ce1803b7a03 11 *
mfiore 0:6ce1803b7a03 12 * You can have more than one root certificate installed at the same time:
mfiore 0:6ce1803b7a03 13 * static const char ssl_certificates[] =
mfiore 0:6ce1803b7a03 14 * "-----BEGIN CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 15 * "MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\r\n"
mfiore 0:6ce1803b7a03 16 * ......
mfiore 0:6ce1803b7a03 17 * "mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=\r\n"
mfiore 0:6ce1803b7a03 18 * "-----END CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 19 * "-----BEGIN CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 20 * "MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\r\n"
mfiore 0:6ce1803b7a03 21 * ......
mfiore 0:6ce1803b7a03 22 * "mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=\r\n"
mfiore 0:6ce1803b7a03 23 * "-----END CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 24 * ;
mfiore 0:6ce1803b7a03 25 */
mfiore 0:6ce1803b7a03 26
mfiore 0:6ce1803b7a03 27 static const char ssl_certificates[] =
mfiore 0:6ce1803b7a03 28 // Root CA for httpbin.org
mfiore 0:6ce1803b7a03 29 "-----BEGIN CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 30 "MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\r\n"
mfiore 0:6ce1803b7a03 31 "MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs\r\n"
mfiore 0:6ce1803b7a03 32 "IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290\r\n"
mfiore 0:6ce1803b7a03 33 "MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux\r\n"
mfiore 0:6ce1803b7a03 34 "FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h\r\n"
mfiore 0:6ce1803b7a03 35 "bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v\r\n"
mfiore 0:6ce1803b7a03 36 "dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt\r\n"
mfiore 0:6ce1803b7a03 37 "H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9\r\n"
mfiore 0:6ce1803b7a03 38 "uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX\r\n"
mfiore 0:6ce1803b7a03 39 "mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX\r\n"
mfiore 0:6ce1803b7a03 40 "a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN\r\n"
mfiore 0:6ce1803b7a03 41 "E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0\r\n"
mfiore 0:6ce1803b7a03 42 "WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD\r\n"
mfiore 0:6ce1803b7a03 43 "VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0\r\n"
mfiore 0:6ce1803b7a03 44 "Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU\r\n"
mfiore 0:6ce1803b7a03 45 "cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx\r\n"
mfiore 0:6ce1803b7a03 46 "IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN\r\n"
mfiore 0:6ce1803b7a03 47 "AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH\r\n"
mfiore 0:6ce1803b7a03 48 "YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5\r\n"
mfiore 0:6ce1803b7a03 49 "6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC\r\n"
mfiore 0:6ce1803b7a03 50 "Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX\r\n"
mfiore 0:6ce1803b7a03 51 "c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a\r\n"
mfiore 0:6ce1803b7a03 52 "mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=\r\n"
mfiore 0:6ce1803b7a03 53 "-----END CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 54 // Root CA for google.com
mfiore 0:6ce1803b7a03 55 "-----BEGIN CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 56 "MIIDfTCCAuagAwIBAgIDErvmMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNVBAYTAlVT\r\n"
mfiore 0:6ce1803b7a03 57 "MRAwDgYDVQQKEwdFcXVpZmF4MS0wKwYDVQQLEyRFcXVpZmF4IFNlY3VyZSBDZXJ0\r\n"
mfiore 0:6ce1803b7a03 58 "aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDIwNTIxMDQwMDAwWhcNMTgwODIxMDQwMDAw\r\n"
mfiore 0:6ce1803b7a03 59 "WjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UE\r\n"
mfiore 0:6ce1803b7a03 60 "AxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\n"
mfiore 0:6ce1803b7a03 61 "CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9m\r\n"
mfiore 0:6ce1803b7a03 62 "OSm9BXiLnTjoBbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIu\r\n"
mfiore 0:6ce1803b7a03 63 "T8rxh0PBFpVXLVDviS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6c\r\n"
mfiore 0:6ce1803b7a03 64 "JmTM386DGXHKTubU1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmR\r\n"
mfiore 0:6ce1803b7a03 65 "Cw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5asz\r\n"
mfiore 0:6ce1803b7a03 66 "PeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo4HwMIHtMB8GA1UdIwQYMBaAFEjm\r\n"
mfiore 0:6ce1803b7a03 67 "aPkr0rKV10fYIyAQTzOYkJ/UMB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrM\r\n"
mfiore 0:6ce1803b7a03 68 "TjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjA6BgNVHR8EMzAxMC+g\r\n"
mfiore 0:6ce1803b7a03 69 "LaArhilodHRwOi8vY3JsLmdlb3RydXN0LmNvbS9jcmxzL3NlY3VyZWNhLmNybDBO\r\n"
mfiore 0:6ce1803b7a03 70 "BgNVHSAERzBFMEMGBFUdIAAwOzA5BggrBgEFBQcCARYtaHR0cHM6Ly93d3cuZ2Vv\r\n"
mfiore 0:6ce1803b7a03 71 "dHJ1c3QuY29tL3Jlc291cmNlcy9yZXBvc2l0b3J5MA0GCSqGSIb3DQEBBQUAA4GB\r\n"
mfiore 0:6ce1803b7a03 72 "AHbhEm5OSxYShjAGsoEIz/AIx8dxfmbuwu3UOx//8PDITtZDOLC5MH0Y0FWDomrL\r\n"
mfiore 0:6ce1803b7a03 73 "NhGc6Ehmo21/uBPUR/6LWlxz/K7ZGzIZOKuXNBSqltLroxwUCEm2u+WR74M26x1W\r\n"
mfiore 0:6ce1803b7a03 74 "b8ravHNjkOR/ez4iyz0H7V84dJzjA1BOoa+Y7mHyhD8S\r\n"
mfiore 0:6ce1803b7a03 75 "-----END CERTIFICATE-----\r\n"
mfiore 0:6ce1803b7a03 76 ;