Add a certificates file to promote the failed request from -60 CURLE_SSL_CACERT to 400 Bad Request
David Blume

David Blume commited on 2020-03-12 16:42:28
Showing 6 changed files, with 67 additions and 8 deletions.

... ...
@@ -6,8 +6,8 @@ all: $(ZIPFILE)
6 6
 	-F "mysubmit=Install" --output /dev/null --write-out "%{http_code}" \
7 7
 	http://$(ROKU_DEV_TARGET)/plugin_install
8 8
 
9
-$(ZIPFILE):  manifest source/*.brs components/*.xml components/*.brs images/*.png
10
-	zip $@ manifest source/*.brs components/*.xml components/*.brs images/*.png
9
+$(ZIPFILE):  manifest certificates/*.pem source/*.brs components/*.xml components/*.brs images/*.png
10
+	zip $@ manifest certificates/*.pem source/*.brs components/*.xml components/*.brs images/*.png
11 11
 
12 12
 clean:
13 13
 	rm $(ZIPFILE)
... ...
@@ -0,0 +1,58 @@
1
+Roku Server Certification Authority
2
+===================================
3
+-----BEGIN CERTIFICATE-----
4
+MIIEUTCCAzmgAwIBAgIJAICEpCGEZklaMA0GCSqGSIb3DQEBBQUAMHgxCzAJBgNV
5
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTYXJhdG9nYTET
6
+MBEGA1UEChMKUm9rdSwgSW5jLjEsMCoGA1UECxMjUm9rdSBTZXJ2ZXIgQ2VydGlm
7
+aWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwOTMwMTk0NDIyWhcNMjgwOTI1MTk0NDIy
8
+WjB4MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMI
9
+U2FyYXRvZ2ExEzARBgNVBAoTClJva3UsIEluYy4xLDAqBgNVBAsTI1Jva3UgU2Vy
10
+dmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
11
+AQ8AMIIBCgKCAQEA1RPUhk5WozEzFkOCJpQsbOmwnoXx9f9jXWMw7sIYe3Oa6pk9
12
+SpDQedRgnvLb1oUqrxcpERcY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lx3/2MzKoLriXlgNwkorFXNqbp4f1V
50
+PScv69NSTvMd2Fq5EqNCRkwoh9PLcC+LuoiDu5qvzcfO2nEm0XunrE40P6+FCdE2
51
+PVD3ftzzMnefbQznKc50UnXn/GbcOZEUN1pPqgU9uR13WtU036zjULSxJGEY6Gte
52
+tGQG/Fk9ixSoKp0erVmPbVzqyU1C7eQjES2HNbXDtil+TUYwXNN6KT9ta9NU0oA+
53
+U9O63nPTq9zPAuCxygwF40ojZrIDCTIbYzebJalQBKYe98Csl+KOS64cefupzTmr
54
+tQyB7j2nvU8MX42TyLSaxAiSsx0x+Y/WI2TJQMr/2pH02MMsDX8KvEeUZzAaS7mi
55
+ZGNwDCcb2Xvo0Lek5NL1U9dQR92iUWnS/M5B9X5nyNdURd1eZxP80zAyAsER4e8h
56
+v2mf5PfQtD35Bodk1W1DS2lzUV6A6j4MZJoZKUQckoPyReE0gsPqSwJYQqR2qpkP
57
+fDFJFDz4riQPCuDkFD9S9wzz
58
+-----END CERTIFICATE-----
... ...
@@ -30,6 +30,7 @@ function executeTask() as void
30 30
         val = aaRunParams[key]
31 31
         m.top.updateText = key + " = " + val.ToStr()
32 32
     end for 
33
+    m.top.updateText = "devID " + CreateObject("roAppInfo").GetDevID()
33 34
 
34 35
     deviceInfo = CreateObject("roDeviceInfo")
35 36
     port = CreateObject("roMessagePort")
... ...
@@ -7,8 +7,8 @@ end sub
7 7
 function GetRequest() as object
8 8
     r = CreateObject("roUrlTransfer")
9 9
     r.InitClientCertificates()
10
-    ' r.SetCertificatesFile("pkg:/certificates/rokuca.pem")
11
-    r.SetCertificatesFile("common:/certs/ca-bundle.crt")
10
+    r.SetCertificatesFile("pkg:/certificates/rokuca.pem")
11
+    ' r.SetCertificatesFile("common:/certs/ca-bundle.crt")
12 12
 
13 13
     r.SetUrl("https://api.roku.com/registrysvc/api/" + CreateObject("roAppInfo").GetDevID())
14 14
     r.AddHeader("accept", "application/json")
... ...
@@ -12,13 +12,13 @@
12 12
 			"name": "Zip",
13 13
 			"working_dir": "$project_path",
14 14
 			"windows": {
15
-				"cmd": "\"C:\\Program Files\\7-Zip\\7z.exe\" a -tzip \"$project_base_name.zip\" manifest source components images"
15
+				"cmd": "\"C:\\Program Files\\7-Zip\\7z.exe\" a -tzip \"$project_base_name.zip\" manifest source components images certificates"
16 16
 			},
17 17
 			"osx": {
18
-				"shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* components/*.* images/*.*"
18
+				"shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* components/*.* images/*.* certifcates/*.*"
19 19
 			},
20 20
 			"linux": {
21
-				"shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* components/*.* images/*.*"
21
+				"shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* components/*.* images/*.* certificates/*.*"
22 22
 			}
23 23
 		}
24 24
 	],
... ...
@@ -1,7 +1,7 @@
1 1
 title=dxb
2 2
 major_version=0
3 3
 minor_version=0
4
-build_version=7
4
+build_version=8
5 5
 ui_resolutions=fhd
6 6
 mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
7 7
 mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png
8 8