pushy icon indicating copy to clipboard operation
pushy copied to clipboard

build ApnsClient: Not supported using BoringSSL

Open extraSix opened this issue 7 years ago • 2 comments

When I try to build ApnsClient, it causes the 'Not supported using BoringSSL' exception.

Here is the error stack:

Caused by: javax.net.ssl.SSLException: failed to set certificate and key
        at io.netty.handler.ssl.ReferenceCountedOpenSslClientContext.newSessionContext(ReferenceCountedOpenSslClientContext.java:120)
        at io.netty.handler.ssl.ReferenceCountedOpenSslClientContext.<init>(ReferenceCountedOpenSslClientContext.java:63)
        at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:781)
        at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:446)
        at com.turo.pushy.apns.ApnsClientBuilder.build(ApnsClientBuilder.java:543)
        at notification.apns.APNsHttp2Provider.initAPNsHttp2Service(APNsHttp2Provider.java:62)
        ... 9 more
Caused by: java.lang.Exception: Not supported using BoringSSL
        at io.netty.internal.tcnative.SSLContext.setCertRequestedCallback(Native Method)
        at io.netty.handler.ssl.ReferenceCountedOpenSslClientContext.newSessionContext(ReferenceCountedOpenSslClientContext.java:115)
        ... 14 more

My pom.xml :

        </dependency>
        <dependency>
            <groupId>com.turo</groupId>
            <artifactId>pushy</artifactId>
            <version>0.13.10</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
            <version>2.0.25.Final</version>
            <scope>runtime</scope>
        </dependency>

java version: 1.7.0_60 os: Ubuntu 14.04.5 LTS

But it is normal when I used pushy-0.8.2 and netty-tcnative-boringssl-static-1.1.33.Fork24 .

Thanks.

extraSix avatar Nov 14 '19 13:11 extraSix

It is my fault. Due to the other dependencies, the version of netty-handler is 4.1.22.Final. It is not satisfied the required version, 4.1.37.Final.

extraSix avatar Nov 15 '19 06:11 extraSix

if anyone wonder why 4.1.37.Final works, this is the reason: https://github.com/netty/netty/issues/9147

xianggao001 avatar Nov 23 '22 13:11 xianggao001