Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start date option to createCertificate() #30

Open
scaret opened this issue Dec 11, 2014 · 11 comments
Open

Add start date option to createCertificate() #30

scaret opened this issue Dec 11, 2014 · 11 comments
Milestone

Comments

@scaret
Copy link
Contributor

scaret commented Dec 11, 2014

When I type a URL in the browser and press Enter, the browser will try to connect to that host:port, and wait for a moment(several seconds); If there isn't a server at the beginning of "the moment", but a server manage to respond before the end of the timeout, the browser will accept it.

Since I have CA key/cert in my PC, I wrote a piece of code that will generate a certificate (according to its IP address), and use the certificate to start an HTTPS server. As in the case above, the request from the browser arrives before I generate the server certificate(and start the HTTPS server), but I can still respond to the request if the server can work in a very short time.

The browser will have a timestamp A when the request is sent, and the server will have a timestamp B when the certificate is signed(valid from). The problem is that, sometimes A is earlier than B, so browser will get a certificate error, given the info that the certificate has not taken into affect when you visit the website.

I think it may be a bug for the browser(Chrome), but it will be good if pem module can cover this by providing option startdate.

@scaret scaret changed the title Add startdate to createCertificate() Add start date option to createCertificate() Dec 11, 2014
@Dexus
Copy link
Owner

Dexus commented Feb 24, 2015

@scaret its no bug of chrome, its if it were other than in chrome its a bug.

tomorrow, i will look to fix add optional params to set a startdate

@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

So it looks like the function createCertificate need to complete rewritten or a new function is need to create startdate and enddate certificates.

With openssl ca is the only way you can create certificates with startdate and enddate.

So you need also a "CA" config and some more data.

https://www.openssl.org/docs/apps/ca#files

So its a littlebit more work.

@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

@andris9 what do you think about it?

@andris9
Copy link
Collaborator

andris9 commented Feb 25, 2015

Hey @Dexus would you be interested of taking over this project (I'd add you as a contributor and also as the npm package owner), so you could edit and publish the code directly? All the recent stuff is way more than I'll ever need or care for.

@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

Hey @andris9 yes i'm interested.
ok, i'm understand. the module is very nice and i'm happy that you made the work and the support for this so long. I love to work with you together and use of your modules.

I am on npmjs.org: dexus1985

Regards, Josef

@andris9
Copy link
Collaborator

andris9 commented Feb 25, 2015

Ok, great! I added you as a collaborator to this repo and also as the npm package owner. So you can modify this repo and publish updates to npm at will.

@Dexus
Copy link
Owner

Dexus commented Feb 25, 2015

Thx.

@Dexus Dexus added this to the 2.0 milestone Aug 31, 2015
@pierreca
Copy link

pierreca commented Nov 9, 2017

Looks like those PRs never made it into the repository? if it is a 2.0.0 thing because createCertificate needs to be rewritten, how soon could we hope for that? what if I submitted a PR?

@KaiSchwarz-cnic
Copy link
Contributor

PR's are welcome and will be reviewed on our side before merging them.
When working on a PR, please be so kind to also try to cover the documentation and unit test part.

@jogamod
Copy link

jogamod commented Dec 7, 2020

This is not implemented yet? 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants