Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix cert gen and bump version

  • Loading branch information...
commit ac318355c3ca9af581f9909038362c57ce8bff7f 1 parent 3621729
@mdp mdp authored
View
2  lib/bin/certgen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
dir=$HOME/.middlefiddle
-serial=`date +%s`
+serial=$2
cert_dir="$dir/certs"
ca_key_file="$dir/ca.key"
ca_crt_file="$dir/ca.crt"
View
4 lib/https_proxy.js
@@ -22,7 +22,7 @@
spawn = require('child_process').spawn;
chainGang = require('chain-gang');
chain = chainGang.create({
- workers: 4
+ workers: 1
});
exports.createProxy = function(middlewares) {
var proxy;
@@ -97,7 +97,7 @@
return callback(currentCerts);
} else {
console.log("Generating certs for " + host);
- prc = spawn("" + __dirname + "/bin/certgen.sh", [host]);
+ prc = spawn("" + __dirname + "/bin/certgen.sh", [host, Date.now()]);
return prc.on('exit', function(code, err) {
if (code === 0) {
return callback(getCerts(host));
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "middlefiddle",
- "version": "0.2.1",
+ "version": "0.2.2",
"description": "Middleware as a proxy for HTTP/HTTPS traffic",
"keywords": ["proxy", "middleware", "connect"],
"repository": "git://github.com/mdp/middlefiddle.git",
View
4 src/https_proxy.coffee
@@ -11,7 +11,7 @@ fs = require('fs')
path = require('path')
spawn = require('child_process').spawn
chainGang = require('chain-gang')
-chain = chainGang.create({workers: 4})
+chain = chainGang.create({workers: 1})
exports.createProxy = (middlewares) ->
proxy = new HttpsProxy(middlewares)
@@ -68,7 +68,7 @@ generateCerts = (host, callback) ->
callback(currentCerts)
else
console.log("Generating certs for #{host}")
- prc = spawn "#{__dirname}/bin/certgen.sh", [host]
+ prc = spawn "#{__dirname}/bin/certgen.sh", [host, Date.now()]
prc.on 'exit', (code, err) ->
if code == 0
callback getCerts(host)
Please sign in to comment.
Something went wrong with that request. Please try again.