Skip to content

Commit

Permalink
Add 'ca' config
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 5, 2011
1 parent 16db6bd commit 97d4ce2
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ It's yet to be seen if this is a good idea.

The browser that is called by the `npm docs` command to open websites.

### ca

* Default: The npm CA certificate
* Type: String or null

The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.

Set to `null` to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.

### cache

* Default: Windows: `~/npm-cache`, Posix: `~/.npm`
Expand Down
10 changes: 10 additions & 0 deletions html/doc/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ <h3 id="browser">browser</h3>

<p>The browser that is called by the <code>npm docs</code> command to open websites.</p>

<h3 id="ca">ca</h3>

<ul><li>Default: The npm CA certificate</li><li>Type: String or null</li></ul>

<p>The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.</p>

<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.</p>

<h3 id="cache">cache</h3>

<ul><li>Default: Windows: <code>~/npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
Expand Down
10 changes: 10 additions & 0 deletions html/doc/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ <h3 id="browser">browser</h3>

<p>The browser that is called by the <code>npm docs</code> command to open websites.</p>

<h3 id="ca">ca</h3>

<ul><li>Default: The npm CA certificate</li><li>Type: String or null</li></ul>

<p>The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.</p>

<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.</p>

<h3 id="cache">cache</h3>

<ul><li>Default: Windows: <code>~/npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
Expand Down
10 changes: 10 additions & 0 deletions html/doc/set.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ <h3 id="browser">browser</h3>

<p>The browser that is called by the <code>npm docs</code> command to open websites.</p>

<h3 id="ca">ca</h3>

<ul><li>Default: The npm CA certificate</li><li>Type: String or null</li></ul>

<p>The Certificate Authority signing certificate that is trusted for SSL
connections to the registry.</p>

<p>Set to <code>null</code> to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority.</p>

<h3 id="cache">cache</h3>

<ul><li>Default: Windows: <code>~/npm-cache</code>, Posix: <code>~/.npm</code></li><li>Type: path</li></ul>
Expand Down
20 changes: 20 additions & 0 deletions lib/utils/config-defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ Object.defineProperty(exports, "defaults", {get: function () {
, browser : process.platform === "darwin" ? "open"
: process.platform === "win32" ? "start"
: "google-chrome"

, ca : // the npm CA certificate.
"-----BEGIN CERTIFICATE-----\n"+
"MIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC\n"+
"VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x\n"+
"IjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w\n"+
"bUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y\n"+
"MTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV\n"+
"BAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj\n"+
"YXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA\n"+
"aXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE\n"+
"OgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz\n"+
"Gn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl\n"+
"y0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC\n"+
"l7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv\n"+
"yNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6EQd1/xEZ7sB1YhQKJtvUrl\n"+
"ZNufy1Jf1r0ldEGeA+0ISck7s+xSh9rQD2Op\n"+
"-----END CERTIFICATE-----\n"

, cache : path.resolve( home || temp
, process.platform === "win32"
? "npm-cache" : ".npm")
Expand Down Expand Up @@ -148,6 +167,7 @@ exports.types =
, "bin-publish" : Boolean
, bindist : [String, null]
, browser : String
, ca: [null, String]
, cache : path
, color : ["always", Boolean]
, depth : Number
Expand Down
18 changes: 18 additions & 0 deletions man1/config.1
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,24 @@ Type: String
.P
The browser that is called by the \fBnpm docs\fR command to open websites\.
.
.SS "ca"
.
.IP "\(bu" 4
Default: The npm CA certificate
.
.IP "\(bu" 4
Type: String or null
.
.IP "" 0
.
.P
The Certificate Authority signing certificate that is trusted for SSL
connections to the registry\.
.
.P
Set to \fBnull\fR to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority\.
.
.SS "cache"
.
.IP "\(bu" 4
Expand Down
18 changes: 18 additions & 0 deletions man1/get.1
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,24 @@ Type: String
.P
The browser that is called by the \fBnpm docs\fR command to open websites\.
.
.SS "ca"
.
.IP "\(bu" 4
Default: The npm CA certificate
.
.IP "\(bu" 4
Type: String or null
.
.IP "" 0
.
.P
The Certificate Authority signing certificate that is trusted for SSL
connections to the registry\.
.
.P
Set to \fBnull\fR to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority\.
.
.SS "cache"
.
.IP "\(bu" 4
Expand Down
18 changes: 18 additions & 0 deletions man1/set.1
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,24 @@ Type: String
.P
The browser that is called by the \fBnpm docs\fR command to open websites\.
.
.SS "ca"
.
.IP "\(bu" 4
Default: The npm CA certificate
.
.IP "\(bu" 4
Type: String or null
.
.IP "" 0
.
.P
The Certificate Authority signing certificate that is trusted for SSL
connections to the registry\.
.
.P
Set to \fBnull\fR to only allow "known" registrars, or to a specific CA cert
to trust only that specific signing authority\.
.
.SS "cache"
.
.IP "\(bu" 4
Expand Down

0 comments on commit 97d4ce2

Please sign in to comment.