-
Notifications
You must be signed in to change notification settings - Fork 229
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 subjectAltName for valid certification in recent browser #4
base: master
Are you sure you want to change the base?
Conversation
hello @j31d0 could you help me out? i am having some issues regarding https websites |
I will try to solve issue when you give description of it (but this requests was made long ago, so I can't guarantee to solve it) |
The Issue is that when I am accessing HTTPS websites, the browser downloads a random named .bin file, for e.g I was wondering where I went wrong... Thank You for your help. |
I couldn't reproduce the result, but I got ERR_CERT_WEAK_SIGNATURE_ALGORITHM message in latest chrome, so I changed to use sha512 hash. (After that patch, proxy works well in my iMac) |
If you have more question or going to give more concrete issue, It may be better to make issue in my forked repository (https://github.com/j31d0/proxy2) |
Btw I changed the code to work on python3 as well |
epoch = "%d" % (time.time() * 1000) | ||
p1 = Popen(["openssl", "req", "-new", "-key", self.certkey, "-subj", "/CN=%s" % hostname], stdout=PIPE) | ||
p2 = Popen(["openssl", "x509", "-req", "-days", "3650", "-CA", self.cacert, "-CAkey", self.cakey, "-set_serial", epoch, "-out", certpath], stdin=p1.stdout, stderr=PIPE) | ||
p2 = Popen(["openssl", "x509", "-req", "-extfile", confpath, "-days", "3650", "-CA", self.cacert, "-CAkey", self.cakey, "-set_serial", epoch, "-sha512", "-out", certpath], stdin=p1.stdout, stderr=PIPE) | ||
p2.communicate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wyd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
epoch = "%d" % (time.time() * 1000) | ||
p1 = Popen(["openssl", "req", "-new", "-key", self.certkey, "-subj", "/CN=%s" % hostname], stdout=PIPE) | ||
p2 = Popen(["openssl", "x509", "-req", "-days", "3650", "-CA", self.cacert, "-CAkey", self.cakey, "-set_serial", epoch, "-out", certpath], stdin=p1.stdout, stderr=PIPE) | ||
p2 = Popen(["openssl", "x509", "-req", "-extfile", confpath, "-days", "3650", "-CA", self.cacert, "-CAkey", self.cakey, "-set_serial", epoch, "-sha512", "-out", certpath], stdin=p1.stdout, stderr=PIPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
H
from the recent browser, certificate with CN(Common Name) is not enough to verify. Chrome requires subjectAlternativeName for version 65 and later, so I added subjectAltName in certificate.