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

BlueSSLService client cannot connect to stunnel server on windows #77

Open
JackyBaby615 opened this issue Jun 19, 2019 · 1 comment
Open

Comments

@JackyBaby615
Copy link

No description provided.

@JackyBaby615
Copy link
Author

I want to connect to stunnel server on windows by using this BlueSSLService client.
But I get an error when I create Socket with SSLService Delegate and connect to stunnel.
This is my function for creating client tls socket
`
func createStealthSocket() -> Socket?{

    var myConfig = SSLService.Configuration(withChainFilePath: self.cert, withPassword: "ghostman", usingSelfSignedCerts: true, clientAllowsSelfSignedCertificates: true)
    myConfig.cipherSuite = "ALL"
    do {
        let socket = try Socket.create(family: .inet)
        socket.delegate = try SSLService(usingConfiguration: myConfig)
        try socket.connect(to: self.tunnelHost, port: Int32(self.tunnelPort))
        return socket
    } catch let error {
        guard error is Socket.Error else {
            print("Unexpected error...")
            return nil
        }
    }
    return nil
}

`
When i run this function, i get a normal return value without error.
After that i write data from this returned socket but if i capture a network packet with wireshark, i get an encrypted alert (21).
Below is the log taken from wireshark.
err

I would be grateful if you can help me out what the error is.

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

1 participant