Skip to content

Commit

Permalink
close connection when SSL CommonName validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick committed Oct 27, 2016
1 parent d201018 commit e309bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ const maxl=1000,trunc=x=>x.length>maxl?x.slice(0,maxl-3)+'...':x
if(x.ssl&&x.subj){
const s=clt.getPeerCertificate().subject.CN
if(s!==x.subj){err(`Wrong server certificate name. Expected:${JSON.stringify(x.subj)}, actual:${JSON.stringify(s)}`)
return}
try{clt.end()}catch(e){console.error(e)};return}
}
initInterpreterConn();new D.IDE().setConnInfo(x.host,x.port,sel?sel.name:'')
})
Expand Down

0 comments on commit e309bb5

Please sign in to comment.