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

Allow passing KeyObjects via postMessage #33360

Closed

Commits on Jun 20, 2020

  1. Configuration menu
    Copy the full SHA
    67d36ca View commit details
    Browse the repository at this point in the history
  2. src: add NativeKeyObject base class

                 +---------------------+
                 |     BaseObject      |
                 +---------------------+
                            |
                            |
                            |
                 +---------------------+
                 |   NativeKeyObject   |
                 +---------------------+
                            |
                            |
                            |
                 +---------------------+
                 |      KeyObject      |
                 +---------------------+
                   /                 \
                  /                   \
                 /                     \
                /                       \
    +---------------------+    +---------------------+
    |   SecretKeyObject   |    | AsymmetricKeyObject |
    +---------------------+    +---------------------+
                                 /                 \
                                /                   \
                               /                     \
                              /                       \
                  +---------------------+   +---------------------+
                  |   PublicKeyObject   |   |   PrivateKeyObject  |
                  +---------------------+   +---------------------+
    tniessen committed Jun 20, 2020
    Configuration menu
    Copy the full SHA
    be4f686 View commit details
    Browse the repository at this point in the history
  3. src: store key data in separate class

    This separates key handles from the actual key data:
    
    +-----------------+
    | NativeKeyObject |
    +-----------------+
            ^
         extends
            |
    +-----------------+    +-----------------+    +---------------+
    | KeyObject  (JS) | -> | KeyObjectHandle | -> | KeyObjectData |
    +-----------------+    +-----------------+    +---------------+
    tniessen committed Jun 20, 2020
    Configuration menu
    Copy the full SHA
    023856d View commit details
    Browse the repository at this point in the history
  4. crypto: allow KeyObjects in postMessage

    This change allows sharing KeyObjects between threads via postMessage.
    The receiver acquires a new KeyObject and a new KeyObjectHandle, but
    refers to the same KeyObjectData:
    
    +-------------------+
    | NativeKeyObject 1 | ------------------------------------------+
    +-------------------+                                           |
            ^                                                       |
         extends                                                    |
            |                                                       |
    +-------------------+    +-------------------+                  |
    | KeyObject 1  (JS) | -> | KeyObjectHandle 1 | --------------+  |
    +-------------------+    +-------------------+               |  |
                                                                 |  |
                                                                 |  |
                                                                 |  |
                                                                 |  |
                                                                 |  |
    +-------------------+                                        |  |
    | NativeKeyObject 2 | ------------------------------------+  |  |
    +-------------------+                                     |  |  |
            ^                                                 |  |  |
         extends                                              |  |  |
            |                                                 |  |  |
    +-------------------+    +-------------------+            |  |  |
    | KeyObject 2  (JS) | -> | KeyObjectHandle 2 | --------+  |  |  |
    +-------------------+    +-------------------+         |  |  |  |
                                                           |  |  |  |
                                                           |  |  |  |
                                                           |  |  |  |
                                                           |  |  |  |
                                                           |  |  |  |
    +-------------------+                                  |  |  |  |
    | NativeKeyObject 3 | ------------------------------+  |  |  |  |
    +-------------------+                               |  |  |  |  |
            ^                                           |  |  |  |  |
         extends                                        |  |  |  |  |
            |                                           v  v  v  v  v
    +-------------------+    +-------------------+    +---------------+
    | KeyObject 3  (JS) | -> | KeyObjectHandle 3 | -> | KeyObjectData |
    +-------------------+    +-------------------+    +---------------+
    
    Co-authored-by: Anna Henningsen <[email protected]>
    tniessen and addaleax committed Jun 20, 2020
    Configuration menu
    Copy the full SHA
    43a87c7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    94b74e5 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. Configuration menu
    Copy the full SHA
    c5d8024 View commit details
    Browse the repository at this point in the history