blob: f9903d9943dfa949caeab1a9c37ea051cf3a71db (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.feed.client.impl;
import org.apache.hc.core5.reactor.ssl.TlsDetails;
import javax.net.ssl.SSLEngine;
/**
* {@link SSLEngine#getApplicationProtocol()} is not available on all JDK8 versions
* (https://bugs.openjdk.org/browse/JDK-8051498)
*
* @author bjorncs
*/
public class TlsDetailsFactory {
private TlsDetailsFactory() {}
public static TlsDetails create(SSLEngine e) {
return new TlsDetails(e.getSession(), e.getApplicationProtocol());
}
}
|