How to use SSLSetALPNProtocols?

I am working on the TLS library for the vapor project and am supporting Apple (Transport-) and OpenSSL security for use in the client and HTTP / 2 server.

In this line of code I'm trying to call SSLSetALPNProtocols. Regardless of my approach, I encounter a linker error ldin this line of code.

Undefined symbols for architecture x86_64:
  "_SSLSetALPNProtocols", referenced from:
      __T08AppleSSL9SSLOptionV4alpnACSaySSG9protocols_tFZySo10SSLContextCKcfU_ in Options.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

There are no documents available to highlight a possible obvious error since the page is empty .

So, how do I get this code to compile with ALPN support?

+4
source share
2 answers

As with the latest version of macOS and Xcode with Swift 4.1, I got started and started working.

0

. Apple SSLSetALPNProtocols SSLCopyALPNProtocols.

rdar://34790589 ( rdar://33907676)

+1

Source: https://habr.com/ru/post/1687300/


All Articles