English 中文(简体)
在MacOSX使用起始SL cert的Node.js上启动HTTPS
原标题:Error when starting HTTPS on Node.js on Mac OSX using StartSSL cert

我正在分头发,试图利用“开始式”特别快车轮机运行。 我从他们那里获得所有必要的档案,我通过在<条码>上通过这些档案:

var options =
{
    ca:     FS.readFileSync( sub.class1.server.ca.pem ),
    key:    FS.readFileSync( ssl.key ),
    cert:   FS.readFileSync( ssl.crt )
};

这是我所说的错误。

Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
    at Object.createCredentials (crypto.js:87:31)
    at HTTPSServer.Server (tls.js:914:28)
    at HTTPSServer.Server (https.js:33:14)
    at HTTPSServer.HTTPSServer (/Users/myUserName/node_modules/connect/lib/https.js:34:16)
    at new HTTPSServer (/Users/myUserName/node_modules/express/lib/https.js:38:23)
    at Object.createServer (/Users/myUserName/node_modules/express/lib/express.js:43:12)
    at Object.<anonymous> (/Users/myUserName/Sites/node.js/https/app.js:12:36)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)

我认为,也许我应该把ert子改给总统府。 但运作:

openssl x509 -in ssl.crt -out ssl.der -outform DER

......我有类似的错误

unable to load certificate
67304:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-44/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE

任何想法为什么?

<><>UPDATE: 只是在OSX发生这种情况。 我试图在乌班图服务器上操作同样的东西,并投入使用。

问题回答

i 问题相同。 然而,我可以证实,在我的机器上(Macbook osx 10.7.3),现在没有使用自签证书的错误。

that particular error means that it either cant find the files, or there s nothing in the files (you can confirm this by passing an empty string or using an invalid file path.)

firstly, try using absolute paths - e.g. FS.readFileSync(__dirname + ssl.crt ).

并开放你的发照和关键档案,确认它们含有数据形式: - 塞内加尔

并且注意到,虽然你的档案是.cert和.key文档,但文件提到证书和主要档案,并注明日期。

http://nodejs.org/api/https.html>。

from what i understand, there isn t much difference, the contents appear pretty similar to me, but these things can be fiddly.

这里的指挥是将案卷改为案卷:

开放式X509 -req -in certrequest.csr -signkey privatekey.pem -out accreditation。 pem

http://silas.sewell.org/blog/ 201006/03/node-js-https-sl-server-example/“http://silas.sewell.org/blog/ 201006/03/node-js-httpssl-server-example/





相关问题
ssl on login form?

I have SSL on my website....when the user logs in from a http page the form action is sent to https page, would this still secure the posted data? Or would it be better to have the form and the page ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Why can t I find the truststore for an SSL handshake?

I m using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. I m running into issues making a ...

To add more parameter for my http header for SSL/TLS

As far as I understand, https is http plus SSL/TLS. What do I need to do if I want to add 3 more parameters for the header? I found a file inside Mozilla s NSS - ssl3ext.c, but I don t understand it ...

Why am I getting handshake_failure with Java SSL cert?

I m trying to use Hudson (which uses SVNKit) to access a Subversion repository that requires a client certificate to access it. I can access the same repository using the same client certificate via ...

热门标签