From 086bf24af5b6fd31b54d5f3b657b1927fffd06a6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 18 Nov 2018 16:00:34 -0700 Subject: [PATCH] WIP more asn1 --- README.md | 10 ++++++---- test.sh | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3740b03..d1e944e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,11 @@ return ecdsacsr({ key: key, domains: domains }).then(function (csr) { * PEM may be a plain string or a Buffer* * DER must be a Buffer* * `domains` must be a list of strings representing domain names - * must be plain old utf8, not punycode + * correctly handles utf-8 + * you may also use punycoded, if needed +* `subject` will be `domains[0]` by default + * you shouldn't use this unless you need to + * you may need to if you need utf-8 for domains, but punycode for the subject * "Buffer" can be a node Buffer, a JavaScript Uint8Array, or a JavaScript Array which contains only numbers between 0 and 255. @@ -78,12 +82,10 @@ Known Issues ------------ I've learned to be careful about talking about the future, -however, I literally just published this tonight (2018-11-17) +however, I literally just published this last night (2018-11-17) and there are a few things I plan to address but haven't yet: * JWK not yet supported -* non-ascii domains, such as 例.中国 not yet supported -* total domains length over 127 characters not yet supported New to Crypto? -------------- diff --git a/test.sh b/test.sh index 426b254..ece262c 100644 --- a/test.sh +++ b/test.sh @@ -25,5 +25,5 @@ openssl req -text -noout -verify -in csr.pem 2>&1 | grep 'verify OK' && echo 'pa rm csr.pem node bin/ecdsacsr.js ./privkey-ec-p256.pem 例.中国,example.com > csr.pem openssl req -text -noout -verify -in csr.pem 2>&1 | grep 'verify OK' && echo 'pass' || echo 'FAIL' -openssl req -text -noout -verify -in csr.pem +#openssl req -text -noout -verify -in csr.pem