Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Rejection while server certificate checks #936

Closed
bruegth opened this issue Jan 19, 2021 · 3 comments
Closed

Unhandled Rejection while server certificate checks #936

bruegth opened this issue Jan 19, 2021 · 3 comments
Assignees
Labels
bug To Review The fix of this issue need to be tested by the community before issue is closed

Comments

@bruegth
Copy link
Contributor

bruegth commented Jan 19, 2021

Current behavior

08:27:58.808Z :verify                        :46   [NODE-OPCUA-W04] Warning: the certificate status is =  BadSecurityChecksFailed  file =  /certs/server_certificate.pem
Unhandled Rejection at Promise: Message: Cannot read property '0' of undefined, Stack: TypeError: Cannot read property '0' of undefined
    at OPCUAServer.<anonymous> (\node_modules\node-opcua-client\dist\verify.js:77:303)
    at Generator.next (<anonymous>)
    at fulfilled (\node_modules\node-opcua-client\dist\verify.js:5:58)

Describe the bug
If the Server certificate is not valid, a unhandled Rejection is thrown.

  • ( ) my request is related to node-opcua acting as an OPCUA CLIENT

  • (X ) my request is related to node-opcua acting as an OPCUA SERVER

    • ( ) I have installed node-opcua from source ( using git clone)
    • (X ) I have installed node-opcua as a package ( using npm install )
    • ( ) I am using an application that uses node-opcua
  • node-opcua version: : 2.30.0

  • Node:
    node --version =14.8.0

@erossignon
Copy link
Member

Thank Thomas, it should not raised this unhandled exception.
The certificate verification code that we recently introduced to check that your server' certificate is correct has highlight a conformance issue (in the certificate) that we didn't accounted for properly.

@erossignon erossignon added the bug label Jan 23, 2021
@erossignon
Copy link
Member

erossignon commented Jan 24, 2021

It should be fixed in node-opcua@2.31.0 , @bruegth can you confirm

@erossignon erossignon added the To Review The fix of this issue need to be tested by the community before issue is closed label Jan 24, 2021
@bruegth
Copy link
Contributor Author

bruegth commented Jan 25, 2021

I can confirm that this is fixed with 2.31.0

@bruegth bruegth closed this as completed Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug To Review The fix of this issue need to be tested by the community before issue is closed
Projects
None yet
Development

No branches or pull requests

2 participants