"algid parse error, not a sequence"on initialize private key of RSA
1507 단어 sequence
BEGIN RSA PRIVATE KEY
header while PKCS#8 has the BEGIN PRIVATE KEY
header). In order to read both PKCS#1 and PKCS#8 PEM files, I use the source code of Apache JMeter's org.apache.jmeter.protocol.oauth.sampler.PrivateKeyReader :
PrivateKey pk = (new PrivateKeyReader("/path/to/myfile.der")).getPrivateKey();
Alternately you can conver your mykey.pem to DER format and use your existing code. Following is the openssl command to do that
//generate PKCS#1 key openssl genrsa -out mykey.pem 1024 //generate public key openssl rsa -in mykey.pem -pubout > mykey.pub
//Convert to PKCS#8 openssl pkcs8 -topk8 -inform PEM -outform DER -in mykey.pem -out mykey.der -nocrypt
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
POJ---3061 Subsequence[대기열 구문 구간 및]Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6746 Accepted: 2465 Description A sequence of N p...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.