Unverified Commit 44c4e9d3 authored by Hong Minhee's avatar Hong Minhee
Browse files

Throw TypeError if a key is not extractable

parent 3542d06a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,14 @@ To be released.
     -  Added `respondWithObjectIfAcceptable()` function.
     -  Added `RespondWithObjectOptions` interface.

 -  The following functions and methods now throw `TypeError` if the specified
    `CryptoKey` is not `extractable`:

     -  `validateCryptoKey()` function
     -  `Context.getActorKey()` method
     -  `Context.sendActivity()` method
     -  `Federation.sendActivity()` method


Version 0.2.0
-------------
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,9 @@ export function validateCryptoKey(
  if (type != null && key.type !== type) {
    throw new TypeError(`The key is not a ${type} key.`);
  }
  if (!key.extractable) {
    throw new TypeError("The key is not extractable.");
  }
  if (key.algorithm.name != "RSASSA-PKCS1-v1_5") {
    throw new TypeError(
      "Currently only RSASSA-PKCS1-v1_5 key is supported.  " +