This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch quarkus-master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit ed4ab980afd76084aa6f17f02b1b5902b64a8a58 Author: Peter Palaga <ppal...@redhat.com> AuthorDate: Tue Mar 2 17:09:06 2021 +0100 Azure extension native build fails with Quarkus 1.13 #2299 --- .../netty/graal/NettySslProviderSubstitutions.java | 50 ------------ .../reactor/netty/graal/OpenSslSubstitutions.java | 90 ---------------------- .../netty/graal/SslProviderSubstitutions.java | 42 ---------- 3 files changed, 182 deletions(-) diff --git a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/NettySslProviderSubstitutions.java b/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/NettySslProviderSubstitutions.java deleted file mode 100644 index b3ed96a..0000000 --- a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/NettySslProviderSubstitutions.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.support.reactor.netty.graal; - -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; -import io.netty.handler.ssl.JdkAlpnApplicationProtocolNegotiator; -import io.netty.handler.ssl.SslProvider; - -//TODO: move this to quarkus-netty https://github.com/apache/camel-quarkus/issues/2142 -@TargetClass(SslProvider.class) -final class NettySslProviderSubstitutions { - @Substitute - public static boolean isAlpnSupported(final SslProvider provider) { - switch (provider) { - case JDK: - return JdkAlpnApplicationProtocolNegotiatorSubstitutions.isAlpnSupported(); - case OPENSSL: - case OPENSSL_REFCNT: - return false; - default: - throw new Error("SslProvider unsupported on Quarkus " + provider); - } - } - -} - -@TargetClass(JdkAlpnApplicationProtocolNegotiator.class) -final class JdkAlpnApplicationProtocolNegotiatorSubstitutions { - @Alias - static boolean isAlpnSupported() { - return true; - } - -} diff --git a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/OpenSslSubstitutions.java b/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/OpenSslSubstitutions.java deleted file mode 100644 index ad7d18e..0000000 --- a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/OpenSslSubstitutions.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.support.reactor.netty.graal; - -import java.util.Collections; -import java.util.List; -import java.util.Set; - -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.RecomputeFieldValue; -import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; -import io.netty.handler.ssl.OpenSsl; - -/** - * JDK is the only supported SSL provider on Quarkus. We thus substitute the methods of {@link OpenSsl} to the effect - * that OpenSSL is not available. - */ -//TODO: move this to quarkus-netty https://github.com/apache/camel-quarkus/issues/2142 -@TargetClass(OpenSsl.class) -final class OpenSslSubstitutions { - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - private static Throwable UNAVAILABILITY_CAUSE = new RuntimeException("OpenSsl unsupported on Quarkus"); - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - static List<String> DEFAULT_CIPHERS = Collections.emptyList(); - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - static Set<String> AVAILABLE_CIPHER_SUITES = Collections.emptySet(); - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - private static Set<String> AVAILABLE_OPENSSL_CIPHER_SUITES = Collections.emptySet(); - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - private static Set<String> AVAILABLE_JAVA_CIPHER_SUITES = Collections.emptySet(); - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - private static boolean SUPPORTS_KEYMANAGER_FACTORY = false; - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - private static boolean SUPPORTS_OCSP = false; - - @Alias - @RecomputeFieldValue(kind = Kind.FromAlias) - static Set<String> SUPPORTED_PROTOCOLS_SET = Collections.emptySet(); - - @Substitute - public static boolean isAvailable() { - return false; - } - - @Substitute - public static int version() { - return -1; - } - - @Substitute - public static String versionString() { - return null; - } - - @Substitute - public static boolean isCipherSuiteAvailable(String cipherSuite) { - return false; - } - -} diff --git a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/SslProviderSubstitutions.java b/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/SslProviderSubstitutions.java deleted file mode 100644 index 511a09a..0000000 --- a/extensions-support/reactor-netty/runtime/src/main/java/org/apache/camel/quarkus/support/reactor/netty/graal/SslProviderSubstitutions.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.support.reactor.netty.graal; - -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; -import io.netty.handler.ssl.IdentityCipherSuiteFilter; -import io.netty.handler.ssl.SslContextBuilder; -import reactor.netty.tcp.SslProvider; - -@TargetClass(SslProvider.class) -//TODO: move this to quarkus-netty https://github.com/apache/camel-quarkus/issues/2142 -public final class SslProviderSubstitutions { - - @Alias - SslContextBuilder sslContextBuilder; - - @Substitute - void updateDefaultConfiguration() { - /* We hardcode the reactor.netty.tcp.SslProvider.DefaultConfigurationType.TCP path from the original method - * to avoid requiring io.netty.handler.ssl.OpenSsl */ - sslContextBuilder.sslProvider(io.netty.handler.ssl.SslProvider.JDK) - .ciphers(null, IdentityCipherSuiteFilter.INSTANCE) - .applicationProtocolConfig(null); - } - -}