Skip to content

Commit

Permalink
Merge pull request #5 from chzhm159/develop
Browse files Browse the repository at this point in the history
update rootUrl to https

Will be in next release, though I can not promise an ETA at this time.
  • Loading branch information
evi-snowm authored Apr 12, 2017
2 parents b016837 + dea57d1 commit 615282e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function CertDownloader(options) {
this.fs = require('fs');
this.util = require('util');
this.certName = 'AppleIncRootCertificate.cer';
this.rootUrl = 'http://www.apple.com/appleca/AppleIncRootCertificate.cer';
this.rootUrl = 'https://www.apple.com/appleca/AppleIncRootCertificate.cer';
this.cachePath = require('os').tmpdir();
if (options) {
if (options.certName) {
Expand Down Expand Up @@ -68,7 +68,7 @@ CertDownloader.prototype.cert = function (callback) {
if (_this.fs.existsSync(certPath)) {
callback(null, certPath);
} else {
require('http').get(_this.rootUrl, function (res) {
require('https').get(_this.rootUrl, function (res) {
var downloadStream = _this.fs.createWriteStream(certPath);
res.pipe(downloadStream);
return downloadStream.on('finish', function () {
Expand Down

0 comments on commit 615282e

Please sign in to comment.