{"record":{"id":"09df91198f20ef1e","repo":"shadow1ng/fscan","slug":"no-peer-certificates","errorCode":null,"errorMessage":"no peer certificates","messagePattern":"no peer certificates","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/grdp/core/socket.go","lineNumber":74,"sourceCode":"\t\tMaxVersion:               tls.VersionTLS13,\n\t\tPreferServerCipherSuites: true,\n\t}\n\ts.tlsConn = tls.Client(s.conn, config)\n\treturn s.tlsConn.Handshake()\n}\n\ntype PublicKey struct {\n\tN *big.Int `asn1:\"explicit,tag:0\"` // modulus\n\tE int      `asn1:\"explicit,tag:1\"` // public exponent\n}\n\nfunc (s *SocketLayer) TlsPubKey() ([]byte, error) {\n\tif s.tlsConn == nil {\n\t\treturn nil, errors.New(\"TLS conn does not exist\")\n\t}\n\tcerts := s.tlsConn.ConnectionState().PeerCertificates\n\tif len(certs) == 0 {\n\t\treturn nil, errors.New(\"no peer certificates\")\n\t}\n\tpub, ok := certs[0].PublicKey.(*rsa.PublicKey)\n\tif !ok {\n\t\treturn nil, errors.New(\"invalid public key type\")\n\t}\n\treturn asn1ber.Marshal(*pub)\n}\n","sourceCodeStart":56,"sourceCodeEnd":82,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/libs/grdp/core/socket.go#L56-L82","documentation":"Raised in SocketLayer.TlsPubKey when the TLS handshake completed but ConnectionState().PeerCertificates is empty, so the RSA server key needed for RDP NLA cannot be extracted. Typically means the server resumed a session without sending certificates or a non-standard TLS peer.","triggerScenarios":"Thrown at libs/grdp/core/socket.go:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable TLS session resumption on the client config so certificates are presented","Retry the connection; some servers intermittently omit certificates","Fall back to standard RDP security negotiation instead of NLA/CredSSP"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}