Unverified Commit b5166915 authored by Hong Minhee's avatar Hong Minhee
Browse files

`CryptographicKey` now can contain PEM-PKCS#1 key

parent 5609c373
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ To be released.
 -  Fedify now accepts PEM-PKCS#1 besides PEM-SPKI for RSA public keys.
    [[#209]]

     -  `CryptographicKey` now can contain a `publicKey` with a PEM-PKCS#1
        format (in addition to PEM-SPKI).
     -  Added `importPkcs1()` function.
     -  Added `importPem()` function.

+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ import { decode as decodeMultibase, encode as encodeMultibase }
import {
    exportSpki,
    exportMultibaseKey,
    importSpki,
    importPem,
    importMultibaseKey,
  } from \\"../runtime/key.ts\\";
import { LanguageString } from \\"../runtime/langstr.ts\\";
@@ -15371,7 +15371,7 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi
        : _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem__array
    ) {
      if (v == null) continue;
    _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem.push(await importSpki(v[\\"@value\\"]))
    _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem.push(await importPem(v[\\"@value\\"]))
    }
    instance.#_2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem = _2fE2QMDdg6KFGqa4NEC3TmjApSAD_publicKeyPem;
    
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ export async function* generateClasses(
  yield `import {
    exportSpki,
    exportMultibaseKey,
    importSpki,
    importPem,
    importMultibaseKey,
  } from "${runtimePath}/key.ts";\n`;
  yield `import { LanguageString } from "${runtimePath}/langstr.ts";\n`;
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ const scalarTypes: Record<string, ScalarType> = {
        && typeof ${v}["@value"] === "string"`;
    },
    decoder(v) {
      return `await importSpki(${v}["@value"])`;
      return `await importPem(${v}["@value"])`;
    },
  },
  "fedify:multibaseKey": {