Replies: 2 comments 6 replies
-
Please provide more substance to your question. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Stumbled upon the same issue. I guess it's because the Related Code: export interface PEMImportOptions {
/**
* (Only effective in Web Crypto API runtimes) The value to use as {@link !SubtleCrypto.importKey}
* `extractable` argument. Default is false.
*/
extractable?: boolean;
}
export declare function importX509<KeyLikeType extends KeyLike = KeyLike>(x509: string, alg: string, options?: PEMImportOptions): Promise<KeyLikeType>;
export declare function importJWK<KeyLikeType extends KeyLike = KeyLike>(jwk: JWK, alg?: string): Promise<KeyLikeType | Uint8Array>; Poc: import * as jose from 'jose';
const jwk = {
"kty": "EC",
"alg": "ES256",
"crv": "P-256",
"x": "mVAX_PXbDxWi9jvhuG5G5R5MyccUDNvlQ00C052VKIg",
"y": "VM20umjb9m29NXJTmTAQ270kDuePulIv7ZYsQS2uQz4",
};
const key = await jose.importJWK(jwk)
console.log(key) // {type: 'public', extractable: false, algorithm: {…}, usages: Array(1)}
const key2 = await jose.exportJWK(key) // failure |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't do this for instance:
Beta Was this translation helpful? Give feedback.
All reactions