-
Notifications
You must be signed in to change notification settings - Fork 203
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
Smimedemo #196
base: master
Are you sure you want to change the base?
Smimedemo #196
Conversation
demo. Only works with the most up to date MUA which there only seems to be one open source project availabe at this time. Offloaded many switches into a separate config file named "smime.js". DOM operation centric routines where placed into "dom.js" Expanded the field which can be created in an X509 certificate or PKCS10 to include alternate_name fields, including IP addresses. Removed email from the DN as it's depricated. Added nessesary parsing so multipart/signed messages can be parsed in this demo long with opaque signed. Expanded the amount of information extracted from included message certificates. Fields are first returned in an object with arrays, which are then proccessed into a table. Certificate chain for verification is extracted from the message at time of parsing. On branch smimedemo Changes to be committed: new file: examples/CMSSignedEncryptComplexExample/README.md new file: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml new file: examples/CMSSignedEncryptComplexExample/dom.js new file: examples/CMSSignedEncryptComplexExample/es6.js new file: examples/CMSSignedEncryptComplexExample/package.json new file: examples/CMSSignedEncryptComplexExample/rollup.config.js new file: examples/CMSSignedEncryptComplexExample/smime.js
On branch smimedemo Changes to be committed: deleted: examples/CMSSignedEncryptComplexExample/bundle.js
This is great, I have wanted to do this for some time. In-fact the idea was to take https://github.com/ebidel/polymer-gmail and create a full-featured demo application. In any event thanks for the sample .We will review it and provide feedback. |
More to come. I forgot to make the line endings CRLF before committing. I'll have that pushed in a couple hours. In a couple days I should have a video up with a long example, and then an other one where I go over some code that even I think is a problem (that I wrote). |
Changes to be committed: modified: examples/CMSSignedEncryptComplexExample/README.md modified: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml modified: examples/CMSSignedEncryptComplexExample/dom.js modified: examples/CMSSignedEncryptComplexExample/es6.js modified: examples/CMSSignedEncryptComplexExample/rollup.config.js modified: examples/CMSSignedEncryptComplexExample/smime.js
@koolsys Have you seen this example?
Later I will continue with your code. But please correct all the issues above. |
What is it? And this: Are these variables or function calls? Anyway, please pass ESLint tests before you put a pull request. |
@@ -0,0 +1,9 @@ | |||
{ | |||
"scripts": { | |||
"build": "rollup -c && sed -f ../script.sed es6.js > ../../test/s_howToEncryptCMSviaCertificate.js", |
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.
You need to change this name: ../../test/s_howToEncryptCMSviaCertificate.js
Will do. ' "build": "rollup -c && sed -f ../script.sed es6.js > ../../test/s_howToEncryptCMSviaCertificate.js",' was added in so long ago I can't remember why it was anymore. I'll get on that. I mostly just program in C, and my Javascript is a little old. So, I wasn't even familiar with JSLint. For renaming the example, there's the older S/MIME and then CMS based S/MIME. Would something like SMIMECMSSignEncryptExample work? |
Also, should we cancel this pull request and start over fresh to prevent junking up the git repo once it's ready? |
No, please continue in scope of this request - just update code in your branch. |
As for naming - we already have set of SMIME examples and set of CMS examples. So please rename it as having only “SMIME...” at the beginning. |
Changes to be committed: new file: SMIMESignedEncryptComplexExample/README.md new file: SMIMESignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml new file: SMIMESignedEncryptComplexExample/dom.js new file: SMIMESignedEncryptComplexExample/es6.js new file: SMIMESignedEncryptComplexExample/package.json new file: SMIMESignedEncryptComplexExample/rollup.config.js new file: SMIMESignedEncryptComplexExample/smime.js Changes not staged for commit: deleted: CMSSignedEncryptComplexExample/README.md deleted: CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml deleted: CMSSignedEncryptComplexExample/dom.js deleted: CMSSignedEncryptComplexExample/es6.js deleted: CMSSignedEncryptComplexExample/package.json deleted: CMSSignedEncryptComplexExample/rollup.config.js deleted: CMSSignedEncryptComplexExample/smime.js
modified: examples/SMIMESignedEncryptComplexExample/dom.js modified: examples/SMIMESignedEncryptComplexExample/es6.js modified: examples/SMIMESignedEncryptComplexExample/smime.js
Changes to be committed: modified: examples/SMIMESignedEncryptComplexExample/package.json
possible. Changes to be committed: modified: examples/SMIMESignedEncryptComplexExample/es6.js
Changes to be committed: deleted: examples/CMSSignedEncryptComplexExample/README.md deleted: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml deleted: examples/CMSSignedEncryptComplexExample/dom.js deleted: examples/CMSSignedEncryptComplexExample/es6.js deleted: examples/CMSSignedEncryptComplexExample/package.json deleted: examples/CMSSignedEncryptComplexExample/rollup.config.js deleted: examples/CMSSignedEncryptComplexExample/smime.js
var Blob; var crypto; var TextEncoder; var TextDecoder; var context; var it; var assert; Options: Allow "this", Allow bitwise operators.
the functions would operate in. Removed one variable from the global space.
tables to list Subject attribute value pairs, and alt name rather than generating a DN string and an unordered.
Syncing this fork with upstream.
more convenient.
certificate will now share the same localKeyID.
New demonstration video is up with JavaScript client to binary client email signing and encryption. It includes all setup sets, and ends with a brief code overview. |
I think this is ready for code review at this point. I still need to build a proper test page. |
@YuryStrozhevsky can do a review. |
Typos on paragraph PeculiarVentures#288
Signed-off-by: YuryStrozhevsky <[email protected]>
Signed-off-by: YuryStrozhevsky <[email protected]>
Signed-off-by: YuryStrozhevsky <[email protected]>
Signed-off-by: YuryStrozhevsky <[email protected]>
Checks for scheme type on data before decoding, this allows us to alert the user if a key is being used where a certificate should be. Also checks for base64 decode success before continuing. Removed setEngine call as issue PeculiarVentures#204 is closed upstream.
demo. Only works with the most up to date MUA which there only seems to be one open source project availabe at this time. Offloaded many switches into a separate config file named "smime.js". DOM operation centric routines where placed into "dom.js" Expanded the field which can be created in an X509 certificate or PKCS10 to include alternate_name fields, including IP addresses. Removed email from the DN as it's depricated. Added nessesary parsing so multipart/signed messages can be parsed in this demo long with opaque signed. Expanded the amount of information extracted from included message certificates. Fields are first returned in an object with arrays, which are then proccessed into a table. Certificate chain for verification is extracted from the message at time of parsing. On branch smimedemo Changes to be committed: new file: examples/CMSSignedEncryptComplexExample/README.md new file: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml new file: examples/CMSSignedEncryptComplexExample/dom.js new file: examples/CMSSignedEncryptComplexExample/es6.js new file: examples/CMSSignedEncryptComplexExample/package.json new file: examples/CMSSignedEncryptComplexExample/rollup.config.js new file: examples/CMSSignedEncryptComplexExample/smime.js
On branch smimedemo Changes to be committed: deleted: examples/CMSSignedEncryptComplexExample/bundle.js
Changes to be committed: modified: examples/CMSSignedEncryptComplexExample/README.md modified: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml modified: examples/CMSSignedEncryptComplexExample/dom.js modified: examples/CMSSignedEncryptComplexExample/es6.js modified: examples/CMSSignedEncryptComplexExample/rollup.config.js modified: examples/CMSSignedEncryptComplexExample/smime.js
Changes to be committed: new file: SMIMESignedEncryptComplexExample/README.md new file: SMIMESignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml new file: SMIMESignedEncryptComplexExample/dom.js new file: SMIMESignedEncryptComplexExample/es6.js new file: SMIMESignedEncryptComplexExample/package.json new file: SMIMESignedEncryptComplexExample/rollup.config.js new file: SMIMESignedEncryptComplexExample/smime.js Changes not staged for commit: deleted: CMSSignedEncryptComplexExample/README.md deleted: CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml deleted: CMSSignedEncryptComplexExample/dom.js deleted: CMSSignedEncryptComplexExample/es6.js deleted: CMSSignedEncryptComplexExample/package.json deleted: CMSSignedEncryptComplexExample/rollup.config.js deleted: CMSSignedEncryptComplexExample/smime.js
modified: examples/SMIMESignedEncryptComplexExample/dom.js modified: examples/SMIMESignedEncryptComplexExample/es6.js modified: examples/SMIMESignedEncryptComplexExample/smime.js
Changes to be committed: modified: examples/SMIMESignedEncryptComplexExample/package.json
possible. Changes to be committed: modified: examples/SMIMESignedEncryptComplexExample/es6.js
Changes to be committed: deleted: examples/CMSSignedEncryptComplexExample/README.md deleted: examples/CMSSignedEncryptComplexExample/SMIMESignEncryptionExample.xhtml deleted: examples/CMSSignedEncryptComplexExample/dom.js deleted: examples/CMSSignedEncryptComplexExample/es6.js deleted: examples/CMSSignedEncryptComplexExample/package.json deleted: examples/CMSSignedEncryptComplexExample/rollup.config.js deleted: examples/CMSSignedEncryptComplexExample/smime.js
var Blob; var crypto; var TextEncoder; var TextDecoder; var context; var it; var assert; Options: Allow "this", Allow bitwise operators.
the functions would operate in. Removed one variable from the global space.
tables to list Subject attribute value pairs, and alt name rather than generating a DN string and an unordered.
more convenient.
certificate will now share the same localKeyID.
internal variable rather than a text field in the document.
each time a new certificate is added to the textarea.
tables to the document object. Information regarding parsed messages is cleared before new information is appended to the document object. Message encapsulation is now included.
Added setEngine call so getCrypto will return undefined if window.crypto.subtle is undefined.
Checks for scheme type on data before decoding, this allows us to alert the user if a key is being used where a certificate should be. Also checks for base64 decode success before continuing. Removed setEngine call as issue PeculiarVentures#204 is closed upstream.
Recommended by git program
CMS S/MIME demo that's confirmed to work with an MUA.
Short basic usage video here: https://www.youtube.com/watch?v=41bdkGS8Y-c channel should also have a video tutorial for more complicated usage including MUA along with code changes.