0. jwt.io 에서는 비밀키 ,공개키 모두 넣어야지 검증이 된다.
1.PEM 수동으로 만드는법
KeyMaterial : HexString -(byte변환)-> KeyBinaray byte[] -(byte64로인코딩)-> PEM형식으로 변환 ( 앞뒤 헤더푸터붙이기)
1. PEM_read_bio_PUBKEY : 공개키 대신 String 을 넣은경우
Verify a RS256 jwt on node PEM_read_bio_PUBKEY failed
Verify a RS256 jwt on node PEM_read_bio_PUBKEY failed
I'm trying to I'm trying to verify a jwt that use the RS256 algorithm. When using the hs256 algorithm everything works fine let opts = { audience: 'y', issuer: `https://x.auth0.com/`, algor...
stackoverflow.com
RS256 needs a public key to verify, but you are providing an string
secretOrPublicKey is a string or buffer containing either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA.
2.asn1 encoding routines:asn1_check_tlen:wrong tag
PKS1
헤더 푸터에 있는 BEGIN RSA PUBLIC KEY 에서 RSA를 빼고 아래처럼 바꿔준다.
-----BEGIN PUBLIC KEY-----
키 내용
-----END PUBLIC KEY-----
'개발과정 간단 정리' 카테고리의 다른 글
리눅스 Password has been used already. Choose another (0) | 2021.12.22 |
---|---|
test (0) | 2021.10.28 |
CICD (0) | 2021.03.23 |
Git Clone 하는데 UserPassword 문제로 진행이 안된다!! (0) | 2021.01.18 |
yml 파일 등 자동 완성이 되지 않을떄 (intellij) (0) | 2020.06.11 |