Replies: 3 comments
-
You need to import import HummingbirdTLS
// if you don't need client certificates
application.server.addTLS(tlsConfiguration: TLSConfiguration.makeClientConfiguration()) If you need client certificates you can do something like this to create the func getTLSConfig(_ arguments: AppArguments) throws -> TLSConfiguration {
let trustRootCert = try NIOSSLCertificate.fromPEMFile(arguments.caCert)
let certificateChain = try NIOSSLCertificate.fromPEMFile(arguments.certificateChain)
let privateKey = try NIOSSLPrivateKey(file: arguments.privateKey, format: .pem)
return TLSConfiguration.forServer(
certificateChain: certificateChain.map { .certificate($0) },
privateKey: .privateKey(privateKey),
trustRoots: .certificates(trustRootCert)
)
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Been trying this without certs to see if it would work with iOS clients. But doesn't look like it. I seem to remember that iOS is very picky about such things. |
Beta Was this translation helpful? Give feedback.
0 replies
-
On Sun, 3 Jul 2022 at 16:13, Derek Clarkson ***@***.***> wrote:
Been trying this without certs to see if it would work with iOS clients.
But doesn't look like it. I seem to remember that iOS is very picky about
such things.
—
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACHSVJZKCDWNQOD5FBEIRXLVSGUYHANCNFSM52OUBIVA>
.
You are receiving this because you commented.Message ID:
<hummingbird-project/hummingbird/repo-discussions/129/comments/3073204@
github.com>
Actually gave you the wrong info there. I gave you details as if you were
setting up a client. You do need certificates. Although I do think there is
a flag to ignore the certificate verification. You should check
TLSConfiguration.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
The app I'm dealing with is trying to use HTTPS but it's not clear how to enable this in Hummingbird. Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions