Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

docusignapi - Error: error:0909006C:PEM routines:get_name:no start line - node

I have cloned this repo (https://github.com/docusign/code-examples-node) and believe I have entered all required keys and codes. But, when I try to authenticate with JWT I get this error:

    at Sign.sign (internal/crypto/sig.js:105:29)
    at Object.sign (C:UsersBrownJ3Documents
eposcode-examples-node
ode_modulesjwaindex.js:152:45)
    at Object.jwsSign [as sign] (C:UsersBrownJ3Documents
eposcode-examples-node
ode_modulesjwslibsign-stream.js:32:24)
    at Object.module.exports [as sign] (C:UsersBrownJ3Documents
eposcode-examples-node
ode_modulesdocusign-esign
ode_modulesjsonwebtokensign.js:189:16)
    at generateAndSignJWTAssertion (C:UsersBrownJ3Documents
eposcode-examples-node
ode_modulesdocusign-esignsrcApiClient.js:62:16)
    at exports.requestJWTUserToken (C:UsersBrownJ3Documents
eposcode-examples-node
ode_modulesdocusign-esignsrcApiClient.js:890:19)
    at _DsJwtAuth._getToken [as getToken] (C:UsersBrownJ3Documents
eposcode-examples-nodelibDSJwtAuth.js:85:33)
    at log (C:UsersBrownJ3Documents
eposcode-examples-nodelibDSJwtAuth.js:174:33)
    at _DsJwtAuth.DsJwtAuth.login (C:UsersBrownJ3Documents
eposcode-examples-nodelibDSJwtAuth.js:184:5)
    at commonControllers.login (C:UsersBrownJ3Documents
eposcode-examples-nodelibcommonControllers.js:36:16) {
  library: 'PEM routines',
  function: 'get_name',
  reason: 'no start line',
  code: 'ERR_OSSL_PEM_NO_START_LINE```
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

What this typically means is that the PEM file is missing the indicator that the key portion has begun.

PEM files are structured like this:

Intitial Data to be processed

-----Begin <Type>-----

Key Information

-----End <Type>-----

The standard for these files can be found here: https://www.rfc-editor.org/rfc/rfc7468

Can you confirm if the -----Begin / End lines are present are present in the PEM file you're using? Please don't post the actual file here, if they are present in the PEM we're going to want to have you open a support case with DocuSign so we keep any necessary private data for troubleshooting private.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...