]> granicus.if.org Git - curl/commitdiff
mk-ca-bundle.vbs: switch to new certdata.txt url.
authorGuenter Knauf <lists@gknw.net>
Fri, 7 Nov 2014 09:27:26 +0000 (10:27 +0100)
committerGuenter Knauf <lists@gknw.net>
Fri, 7 Nov 2014 09:27:26 +0000 (10:27 +0100)
lib/mk-ca-bundle.vbs

index d86807929e02414274899a1be917337606c5b6a3..c2346720cca8e53f20a0c7478a19d0aeb53663fb 100755 (executable)
 '* Hacked by Guenter Knauf\r
 '***************************************************************************\r
 Option Explicit\r
-Const myVersion = "0.3.8"\r
-\r
-Const myUrl = "http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1"\r
+Const myVersion = "0.3.9"\r
 \r
+Const myUrl = "http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt"\r
 Const myOpenssl = "openssl.exe"\r
 \r
 Const myCdSavF = FALSE       ' Flag: save downloaded data to file certdata.txt\r
@@ -48,7 +47,7 @@ Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest.5.1")
 If objHttp Is Nothing Then Set objHttp = WScript.CreateObject("WinHttp.WinHttpRequest")\r
 myBase = Left(WScript.ScriptFullName, InstrRev(WScript.ScriptFullName, "\"))\r
 mySelf = Left(WScript.ScriptName, InstrRev(WScript.ScriptName, ".") - 1) & " " & myVersion\r
-myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1, InstrRev(myUrl, "?") - InstrRev(myUrl, "/") - 1)\r
+myCdFile = Mid(myUrl, InstrRev(myUrl, "/") + 1)\r
 myCaFile = "ca-bundle.crt"\r
 myTmpName = InputBox("Enter output filename:", mySelf, myCaFile)\r
 If Not (myTmpName = "") Then\r
@@ -60,8 +59,8 @@ objHttp.SetTimeouts 0, 5000, 10000, 10000
 objHttp.Open "GET", myUrl, FALSE\r
 objHttp.setRequestHeader "User-Agent", WScript.ScriptName & "/" & myVersion\r
 objHttp.Send ""\r
-If Not (objHttp.statusText = "OK") Then\r
-  MsgBox("Failed to download '" & myCdFile & "': " & objHttp.statusText), vbCritical, mySelf\r
+If Not (objHttp.Status = 200) Then\r
+  MsgBox("Failed to download '" & myCdFile & "': " & objHttp.Status & " - " & objHttp.StatusText), vbCritical, mySelf\r
   WScript.Quit 1\r
 End If\r
 ' Convert data from ResponseBody instead of using ResponseText because of UTF-8\r