Skip to content

Self sign certificate, 400 error #66

Closed
@jbarros35

Description

@jbarros35

Hi, I tried on development a self signed certificate, but we could not connect.
Using a default no secure it works but it cannot run on a real device.
Do you have any advice?

    self.socketClient = StompClientLib()
    let url = NSURL(string: "wss://192.168.1.134:9002/api/ws")!
    socketClient.openSocketWithURLRequest(request: NSURLRequest(url: url as URL) , delegate: self)
    // auto reconnect
    socketClient.reconnect(request: NSURLRequest(url: url as URL) , delegate: self, time: 15.0)

Error:
didFailWithError: Optional(Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 400" UserInfo={NSLocalizedDescription=received bad response code from server 400, HTTPResponseStatusCode=400})
2019-08-22 10:14:30.791461+0100 loxy4-app[8836:6292750] [Debug] [main] [WebSocketConnection.swift:60] serverDidSendError(client:withErrorMessage:detailedErrorMessage:) > received bad response code from server 400
didFailWithError: Optional(Error Domain=SRWebSocketErrorDomain Code=2132 "received bad response code from server 400" UserInfo={NSLocalizedDescription=received bad response code from server 400, HTTPResponseStatusCode=400})

Device:
iPhone 6s IOS 12.4
StompClientLib version:
Using StompClientLib (1.3.2)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions