-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
91 lines (91 loc) · 5.5 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"_args": [
[
{
"raw": "cert-downloader",
"scope": null,
"escapedName": "cert-downloader",
"name": "cert-downloader",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"C:\\Users\\tnikolov\\tmp\\test2"
]
],
"_from": "cert-downloader@latest",
"_id": "cert-downloader@0.2.1",
"_inCache": true,
"_location": "/cert-downloader",
"_nodeVersion": "4.2.2",
"_npmUser": {
"name": "plondema",
"email": "plondema@service2media.com"
},
"_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
"raw": "cert-downloader",
"scope": null,
"escapedName": "cert-downloader",
"name": "cert-downloader",
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"#USER"
],
"_resolved": "http://registry.npmjs.org/cert-downloader/-/cert-downloader-0.2.1.tgz",
"_shasum": "26b008d1eaf92fb31bc386bc0a4e270966e98251",
"_shrinkwrap": null,
"_spec": "cert-downloader",
"_where": "C:\\Users\\tnikolov\\tmp\\test2",
"author": {
"name": "P. Londema",
"email": "p.londema@service2media.com"
},
"bugs": {
"url": "https://github.com/evi-snowm/cert-downloader/issues"
},
"dependencies": {},
"description": "(Apple) SSL certificate downloader",
"devDependencies": {
"mocha": "2.3.x"
},
"directories": {},
"dist": {
"shasum": "26b008d1eaf92fb31bc386bc0a4e270966e98251",
"tarball": "https://registry.npmjs.org/cert-downloader/-/cert-downloader-0.2.1.tgz"
},
"gitHead": "b86813e5799cd9b54b549a490a4ef2b3e82d3ba6",
"homepage": "https://github.com/evi-snowm/cert-downloader",
"keywords": [
"apple",
"cer",
"certificate",
"download",
"pem",
"ssl"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "plondema",
"email": "plondema@service2media.com"
}
],
"name": "cert-downloader",
"optionalDependencies": {},
"readme": "# cert-downloader [![Build Status](https://travis-ci.org/evi-snowm/cert-downloader.svg?branch=develop)](https://travis-ci.org/evi-snowm/cert-downloader)\n\nThis is a helper module that allows you to download an SSL certificate, by default that of Apple Inc..\n\nOffered functionality:\n* Download certificate and store locally.\n* Convert certificate to PEM format.\n* Validate a file against the certificate.\n\nMore information and links to source code: [http://evi-snowm.github.io/cert-downloader/](http://evi-snowm.github.io/cert-downloader/)\n\n**NOTE** OpenSSL or compatible must be installed on your system if you wish to use certificates in the PEM format.\nWithout this tool, only the download function will work.\n\n## Install\n```sh\n$ npm install cert-downloader\n```\n\n## Usage\n\n```js\nvar CertDownloader = require('cert-downloader');\nvar certDl = new CertDownloader();\n\n// download and save in default (cache) location\ncertDl.cert(function (error, certificatePath) {\n if(error) {\n console.error('Error ' + error);\n } else {\n console.log('Certificate downloaded to ' + certificatePath);\n // /nodeproject/certificate/AppleIncRootCertificate.cer\n }\n});\n\n// download and convert to PEM (will use cached cer file and convert that to pem)\ncertDl.pem(function (error, certificatePath) {\n if(error) {\n console.error('Error ' + error);\n } else {\n console.log('Certificate downloaded to ' + certificatePath);\n // /nodeproject/certificate/AppleIncRootCertificate.pem\n }\n});\n\n// verifiy an existing file against the certificate\n// (will download and convert if required)\nvar file = '/nodeproject/certificate/file-to-verify';\ncertDl.verify(file, function(error, output) {\n if(error){\n return callback('File verification failed: ' + error);\n }\n console.log('Verified output: ' + output);\n });\n```\n\n##API\n\n###CertDownloader([options])\nConstruct a new CertDownloader.\n \nYou will always need to call this first. `options` Overrides one or several defaults and should be in JSON format with any of the following options:\n\n * `certName`: name of the certificate (default is `AppleIncRootCertificate.cer`)\n * `url` : URL to download the certificate from (default is `http://www.apple.com/appleca/AppleIncRootCertificate.cer`)\n * `cache` : path to cache location (a.k.a. where to keep the certificates locally, by default this is the operating system's default directory for temp files)\n\n###cert(callback)\nRetrieve the certificate.\n\nAttempts to download a missing certificate and returns the path to said certificate if available (either cached or downloaded). The callback gets two arguments (err, path), where path is a string to the location of the certificate.\n\n###pem(callback)\nRetrieve the certificate in PEM format.\n\nAttempts to download and convert a missing certificate and returns the path to said certificate if available (either cached or converted). The callback gets two arguments (err, path), where path is a string to the location of the certificate.\n\n###verify(file, callback)\nVerifies a file against the certificate.\n\nAttempts to download and convert a missing certificate and returns the content of the file if successfully verified. The callback gets two arguments (err, output), where output is the content of the file if successfully verified.\n\n\n## License\n\nMIT © Patrick Londema",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/evi-snowm/cert-downloader.git"
},
"scripts": {
"test": "mocha"
},
"version": "0.2.1"
}