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

DEPTH_ZERO_SELF_SIGNED_CERT #32

Closed
strk opened this issue Mar 18, 2016 · 4 comments
Closed

DEPTH_ZERO_SELF_SIGNED_CERT #32

strk opened this issue Mar 18, 2016 · 4 comments

Comments

@strk
Copy link

strk commented Mar 18, 2016

I'm getting DEPTH_ZERO_SELF_SIGNED_CERT errors despite using "noSslValidation" option:

      http.get({                                                      
                    url : tiles_url,                                            
                    // We don't need ssl validation during tests                
                    noSslValidation : true                                      
                }, ...

The stack trace:

     Error: DEPTH_ZERO_SELF_SIGNED_CERT                                         
      at SecurePair.<anonymous> (tls.js:1370:32)                                
      at SecurePair.maybeInitFinished (tls.js:982:10)                           
      at CleartextStream.read [as _read] (tls.js:469:13)                        
      at CleartextStream.Readable.read (_stream_readable.js:320:10)             
      at EncryptedStream.write [as _write] (tls.js:366:25)                      
      at doWrite (_stream_writable.js:226:10)                                   
      at writeOrBuffer (_stream_writable.js:216:5)                              
      at EncryptedStream.Writable.write (_stream_writable.js:183:11)            
      at write (_stream_readable.js:583:24)                                     
      at flow (_stream_readable.js:592:7)                                       
      at Socket.pipeOnReadable (_stream_readable.js:624:5)                      
      at emitReadable_ (_stream_readable.js:408:10)                             
      at emitReadable (_stream_readable.js:404:5)                               
      at readableAddChunk (_stream_readable.js:165:9)                           
      at Socket.Readable.push (_stream_readable.js:127:10)                      
      at TCP.onread (net.js:528:21)                          

I've also exported NODE_TLS_REJECT_UNAUTHORIZED=0 but have the same problem.

Node version is v0.10.26

@SaltwaterC
Copy link
Owner

Hi. Is the URL relevant, or can it be reproduced with any self-sign cert?

@strk
Copy link
Author

strk commented Mar 18, 2016

I think it can be reproduced, looking here: request/request#418 -- but I didnt' test myself

@SaltwaterC
Copy link
Owner

Yep, bad documentation is bad. Sorry about that. Dropped the ball white writing the jsdoc block. The source code reads:

        if (this.options.noSslVerifier !== true) {
            this.reqOpt.rejectUnauthorized = true;
        } else {
            this.reqOpt.rejectUnauthorized = false;
        }

The correct option key is noSslVerifier. Can you please recheck if it works with this option?

@strk
Copy link
Author

strk commented Mar 18, 2016

noSslVerifier sems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants