This is an automated email from the ASF dual-hosted git repository.

Croway pushed a commit to branch camel-4.18.6-recipes
in repository https://gitbox.apache.org/repos/asf/camel-upgrade-recipes.git

commit 476782ff494a97d9507ef917cfb9668c02443190
Author: croway <[email protected]>
AuthorDate: Mon Nov 30 11:22:08 2026 +0100

    Migrate the Bouncy Castle 1.85 parameter specs of camel-pqc in 4.18.6
    
    Camel 4.18.6 moved to Bouncy Castle 1.85 and camel-pqc now runs KYBER,
    DILITHIUM and SPHINCSPLUS as ML-KEM, ML-DSA and SLH-DSA through the BC
    provider (camel-4x-upgrade-guide-4_18 "camel-pqc - Bouncy Castle 1.85").
    camel422_2.migratePqcParameterSpecs already did this for 4.22.2 and 4.23.0,
    but it cannot be reused as is: at the camel-4.18.6 tag camel-pqc still uses
    the BCPQC CMCEParameterSpec and FrodoParameterSpec, so their move belongs to
    4.22.2 only.
    
    Following RECIPE-CONVENTIONS.md, the shared part moves into the new
    camel418_6.migratePqcParameterSpecs, chained by camel418_6, and
    camel422_2.migratePqcParameterSpecs keeps its name and references it, with
    the CMCE and Frodo changes of its own.
    
    The shared recipe now also rewrites the parameter-set constants to the ones
    camel-pqc 4.18.6 itself switched to (kyber768 to ml_kem_768, dilithium2 to
    ml_dsa_44, sha2_128s to slh_dsa_sha2_128s, ...), so 4.22.2 and 4.23.0 get
    them too. The SPHINCS+ robust and haraka sets have no SLH-DSA counterpart
    and stay manual.
---
 .../main/resources/META-INF/rewrite/4.18.6.yaml    | 87 +++++++++++++++++++-
 .../main/resources/META-INF/rewrite/4.22.2.yaml    | 21 ++---
 .../apache/camel/upgrade/CamelUpdate418_6Test.java | 92 +++++++++++++++++++++-
 .../apache/camel/upgrade/CamelUpdate422_2Test.java | 35 +++++++-
 release_notes.adoc                                 |  4 +
 5 files changed, 221 insertions(+), 18 deletions(-)

diff --git 
a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18.6.yaml 
b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18.6.yaml
index 9d324fa..6b37e69 100644
--- a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18.6.yaml
+++ b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.18.6.yaml
@@ -24,7 +24,9 @@
 # migrate was confirmed in the code at the camel-4.18.6 tag.
 #
 # The openstack Swift header rename and the pubnub override channel also ship 
in Camel 4.22.3 and 4.24.0 (not in
-# 4.23.0), so per RECIPE-CONVENTIONS.md the recipes live here and the 
camel422_3 chain references them.
+# 4.23.0), so per RECIPE-CONVENTIONS.md the recipes live here and the 
camel422_3 chain references them. The
+# Bouncy Castle parameter spec migration is shared with 4.22.2 and 4.23.0 
(Bouncy Castle 1.86), which reference it
+# through camel422_2.migratePqcParameterSpecs.
 #####
 
 #####
@@ -38,6 +40,7 @@ description: Migrates `camel 4.18.5` application to `camel 
4.18.6`.
 recipeList:
   - org.apache.camel.upgrade.camel418_6.upgradeOpenstackSwiftHeaders
   - org.apache.camel.upgrade.camel418_6.upgradePubNubOverrideChannel
+  - org.apache.camel.upgrade.camel418_6.migratePqcParameterSpecs
 ---
 ## 
https://github.com/apache/camel/blob/main/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc#camel-openstack---the-remaining-swift-header-constants-follow-the-camel-naming-convention
 type: specs.openrewrite.org/v1beta/recipe
@@ -93,3 +96,85 @@ recipeList:
       newConstantName: OVERRIDE_CHANNEL
       oldHeaderNameBuilderMethod: 
org.apache.camel.builder.endpoint.dsl.PubNubEndpointBuilderFactory.PubNubHeaderNameBuilder
 pubNubChannel()
       newHeaderNameBuilderMethod: pubNubOverrideChannel
+---
+## 
https://github.com/apache/camel/blob/main/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc#camel-pqc---bouncy-castle-185
+type: specs.openrewrite.org/v1beta/recipe
+name: org.apache.camel.upgrade.camel418_6.migratePqcParameterSpecs
+displayName: Migrate the Bouncy Castle Kyber, Dilithium and SPHINCS+ parameter 
specs used with camel-pqc
+description: >-
+  Camel 4.18.6 moved to Bouncy Castle 1.85, and camel-pqc now runs KYBER, 
DILITHIUM and SPHINCSPLUS as ML-KEM, ML-DSA
+  and SLH-DSA through the BC provider. Changes KyberParameterSpec, 
DilithiumParameterSpec and SPHINCSPlusParameterSpec
+  of org.bouncycastle.pqc.jcajce.spec to MLKEMParameterSpec, 
MLDSAParameterSpec and SLHDSAParameterSpec of
+  org.bouncycastle.jcajce.spec, and their parameter sets to the standardized 
ones camel-pqc uses (kyber768 to
+  ml_kem_768, dilithium2 to ml_dsa_44, sha2_128s to slh_dsa_sha2_128s, ...). 
The SPHINCS+ robust and haraka parameter
+  sets have no SLH-DSA counterpart and need a manual fix. Shared with Camel 
4.22.2 and 4.23.0 (Bouncy Castle 1.86),
+  where camel422_2.migratePqcParameterSpecs references it; CMCE and Frodo stay 
on the BCPQC classes in 4.18.6.
+preconditions:
+  - org.openrewrite.java.dependencies.search.ModuleHasDependency:
+      groupIdPattern: org.apache.camel
+      artifactIdPattern: camel-pqc
+recipeList:
+  # the parameter sets first: ReplaceConstantWithAnotherConstant matches on 
the old type
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec.kyber512
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec.ml_kem_512
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec.kyber768
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec.ml_kem_768
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec.kyber1024
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec.ml_kem_1024
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec.dilithium2
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec.ml_dsa_44
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec.dilithium3
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec.ml_dsa_65
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec.dilithium5
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec.ml_dsa_87
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_128f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_128f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_128s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_128s
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_192f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_192f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_192s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_192s
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_256f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_256f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.sha2_256s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_sha2_256s
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_128f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_128f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_128s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_128s
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_192f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_192f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_192s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_192s
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_256f
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_256f
+  - org.openrewrite.java.ReplaceConstantWithAnotherConstant:
+      existingFullyQualifiedConstantName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec.shake_256s
+      fullyQualifiedConstantName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec.slh_dsa_shake_256s
+  - org.openrewrite.java.ChangeType:
+      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec
+      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec
+  - org.openrewrite.java.ChangeType:
+      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec
+      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec
+  - org.openrewrite.java.ChangeType:
+      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec
+      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec
diff --git 
a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.22.2.yaml 
b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.22.2.yaml
index 65528ab..2f607db 100644
--- a/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.22.2.yaml
+++ b/camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.22.2.yaml
@@ -44,28 +44,23 @@ displayName: Migrate the removed Bouncy Castle BCPQC 
parameter spec classes used
 description: >-
   Camel 4.22.2 and 4.23.0 moved to Bouncy Castle 1.86, which removed the 
legacy org.bouncycastle.pqc.jcajce.spec
   parameter spec classes. Changes them to the org.bouncycastle.jcajce.spec 
classes of the BC provider:
-  CMCEParameterSpec, FrodoParameterSpec to FrodoKEMParameterSpec, 
KyberParameterSpec to MLKEMParameterSpec,
-  DilithiumParameterSpec to MLDSAParameterSpec and SPHINCSPlusParameterSpec to 
SLHDSAParameterSpec. The static
-  parameter-set fields of the new classes carry the standardized names (for 
example MLKEMParameterSpec.ml_kem_768
-  instead of KyberParameterSpec.kyber768), so field references still need a 
manual fix-up. PicnicParameterSpec,
+  CMCEParameterSpec, FrodoParameterSpec to FrodoKEMParameterSpec, and through 
the 4.18.6 recipe
+  camel418_6.migratePqcParameterSpecs (Camel 4.18.6 made the same move on 
Bouncy Castle 1.85) KyberParameterSpec to
+  MLKEMParameterSpec, DilithiumParameterSpec to MLDSAParameterSpec and 
SPHINCSPlusParameterSpec to
+  SLHDSAParameterSpec, with their parameter sets (for example 
KyberParameterSpec.kyber768 to
+  MLKEMParameterSpec.ml_kem_768). The CMCE and Frodo parameter-set fields keep 
their names in the new classes; the
+  SPHINCS+ robust and haraka ones have no SLH-DSA counterpart and need a 
manual fix-up. PicnicParameterSpec,
   PQCSignatureAlgorithms.PICNIC and PQCDefaultPicnicMaterial have no 
replacement.
 preconditions:
   - org.openrewrite.java.dependencies.search.ModuleHasDependency:
       groupIdPattern: org.apache.camel
       artifactIdPattern: camel-pqc
 recipeList:
+  ## inherited from patch recipe: the Kyber, Dilithium and SPHINCS+ migration 
also ships in 4.18.6
+  - org.apache.camel.upgrade.camel418_6.migratePqcParameterSpecs
   - org.openrewrite.java.ChangeType:
       oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.CMCEParameterSpec
       newFullyQualifiedTypeName: org.bouncycastle.jcajce.spec.CMCEParameterSpec
   - org.openrewrite.java.ChangeType:
       oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.FrodoParameterSpec
       newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.FrodoKEMParameterSpec
-  - org.openrewrite.java.ChangeType:
-      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec
-      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec
-  - org.openrewrite.java.ChangeType:
-      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec
-      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec
-  - org.openrewrite.java.ChangeType:
-      oldFullyQualifiedTypeName: 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec
-      newFullyQualifiedTypeName: 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec
diff --git 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate418_6Test.java
 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate418_6Test.java
index 1d745ce..d87c1c5 100644
--- 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate418_6Test.java
+++ 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate418_6Test.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.upgrade;
 
+import org.junit.jupiter.api.Assumptions;
 import org.junit.jupiter.api.Test;
 import org.openrewrite.DocumentExample;
 import org.openrewrite.test.RecipeSpec;
@@ -29,15 +30,17 @@ import static org.openrewrite.yaml.Assertions.yaml;
 
 /**
  * Tests for migrating from Camel 4.18.5 to 4.18.6: the remaining 
camel-openstack Swift header names (CAMEL-25895) and
- * the pubnub override channel (CAMEL-25888), which also ship in 4.22.3 and 
4.24.0. The Swift Endpoint DSL header
- * builders and PubNubConstants.CHANNEL are the same in 4.18.5 and 4.22, so 
the 4.22 jars are on the parser classpath.
+ * the pubnub override channel (CAMEL-25888), which also ship in 4.22.3 and 
4.24.0, and the Bouncy Castle 1.85
+ * parameter spec migration of camel-pqc, which 4.22.2 and 4.23.0 reference. 
The Swift Endpoint DSL header builders and
+ * PubNubConstants.CHANNEL are the same in 4.18.5 and 4.22, so the 4.22 jars 
are on the parser classpath; Bouncy Castle
+ * 1.85 has both the BCPQC and the BC parameter spec classes.
  */
 public class CamelUpdate418_6Test implements RewriteTest {
 
     @Override
     public void defaults(RecipeSpec spec) {
         CamelTestUtil.recipe(spec, CamelTestUtil.CamelVersion.v4_18_6)
-                
.parser(CamelTestUtil.parserFromClasspath(CamelTestUtil.CamelVersion.v4_22, 
"camel-api", "camel-core-model", "camel-support", "camel-endpointdsl", 
"camel-pubnub"))
+                
.parser(CamelTestUtil.parserFromClasspath(CamelTestUtil.CamelVersion.v4_22, 
"camel-api", "camel-core-model", "camel-support", "camel-endpointdsl", 
"camel-pubnub", "bcprov-jdk18on"))
                 .typeValidationOptions(TypeValidation.none());
     }
 
@@ -480,4 +483,87 @@ public class CamelUpdate418_6Test implements RewriteTest {
                 )
         );
     }
+
+    @Test
+    void migratePqcParameterSpecs() {
+        rewriteRun(
+                mavenProject("test-pqc",
+                        CamelTestUtil.pomXmlSpec("camel-pqc", 
CamelTestUtil.CamelVersion.v4_18_5),
+                        //language=java
+                        java(
+                                """
+                                import 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec;
+                                import 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec;
+                                import 
org.bouncycastle.pqc.jcajce.spec.SPHINCSPlusParameterSpec;
+
+                                public class KeyMaterial {
+                                    private DilithiumParameterSpec dilithium = 
DilithiumParameterSpec.dilithium3;
+                                    private KyberParameterSpec kyber = 
KyberParameterSpec.kyber768;
+                                    private SPHINCSPlusParameterSpec sphincs = 
SPHINCSPlusParameterSpec.sha2_128s;
+                                    private SPHINCSPlusParameterSpec 
sphincsShake = SPHINCSPlusParameterSpec.shake_256f;
+                                }
+                                """,
+                                """
+                                import 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec;
+                                import 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec;
+                                import 
org.bouncycastle.jcajce.spec.SLHDSAParameterSpec;
+
+                                public class KeyMaterial {
+                                    private MLDSAParameterSpec dilithium = 
MLDSAParameterSpec.ml_dsa_65;
+                                    private MLKEMParameterSpec kyber = 
MLKEMParameterSpec.ml_kem_768;
+                                    private SLHDSAParameterSpec sphincs = 
SLHDSAParameterSpec.slh_dsa_sha2_128s;
+                                    private SLHDSAParameterSpec sphincsShake = 
SLHDSAParameterSpec.slh_dsa_shake_256f;
+                                }
+                                """
+                        )
+                )
+        );
+    }
+
+    @Test
+    void pqcCmceAndFrodoStayOnBcpqcIn4186() {
+        // camel-pqc 4.18.6 still uses the BCPQC CMCE and Frodo classes; only 
4.22.2 and 4.23.0 move them, so the
+        // 4.22 LTS and latest chains, which run camel422_2, do migrate them 
(see CamelUpdate422_2Test)
+        String overridden = 
System.getProperty(CamelTestUtil.PROPERTY_USE_RECIPE);
+        Assumptions.assumeTrue(!CamelTestUtil.isRecipeOverridden()
+                               || 
"org.apache.camel.upgrade.Camel418LTSMigrationRecipe".equals(overridden));
+        rewriteRun(
+                spec -> 
spec.expectedCyclesThatMakeChanges(CamelTestUtil.isRecipeOverridden() ? 1 : 0),
+                mavenProject("test-pqc-kem",
+                        CamelTestUtil.pomXmlSpec("camel-pqc", 
CamelTestUtil.CamelVersion.v4_18_5),
+                        //language=java
+                        java(
+                                """
+                                import 
org.bouncycastle.pqc.jcajce.spec.CMCEParameterSpec;
+                                import 
org.bouncycastle.pqc.jcajce.spec.FrodoParameterSpec;
+
+                                public class KemMaterial {
+                                    private CMCEParameterSpec cmce;
+                                    private FrodoParameterSpec frodo;
+                                }
+                                """
+                        )
+                )
+        );
+    }
+
+    @Test
+    void preconditionBlocksPqcSpecsWithoutDependency() {
+        rewriteRun(
+                spec -> 
spec.expectedCyclesThatMakeChanges(CamelTestUtil.isRecipeOverridden() ? 1 : 0),
+                mavenProject("test-no-pqc",
+                        CamelTestUtil.pomXmlSpec("camel-core", 
CamelTestUtil.CamelVersion.v4_18_5),
+                        //language=java
+                        java(
+                                """
+                                import 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec;
+
+                                public class KeyMaterial {
+                                    private KyberParameterSpec kyber = 
KyberParameterSpec.kyber768;
+                                }
+                                """
+                        )
+                )
+        );
+    }
 }
diff --git 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate422_2Test.java
 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate422_2Test.java
index 6508df4..7ad19de 100644
--- 
a/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate422_2Test.java
+++ 
b/camel-upgrade-recipes/src/test/java/org/apache/camel/upgrade/CamelUpdate422_2Test.java
@@ -26,7 +26,8 @@ import static org.openrewrite.java.Assertions.mavenProject;
 
 /**
  * Tests for migrating from Camel 4.22.1 to 4.22.2: the Bouncy Castle 1.86 
parameter spec classes used with
- * camel-pqc (CAMEL-25468), which also ship in 4.23.0. The 4.18.5 mustache and 
chunk header renames that the
+ * camel-pqc (CAMEL-25468), which also ship in 4.23.0. The Kyber, Dilithium 
and SPHINCS+ part is the 4.18.6 recipe,
+ * covered by {@link CamelUpdate418_6Test}. The 4.18.5 mustache and chunk 
header renames that the
  * 4.22.2 chain references are covered by {@link CamelUpdate418_5Test}.
  */
 public class CamelUpdate422_2Test implements RewriteTest {
@@ -98,6 +99,38 @@ public class CamelUpdate422_2Test implements RewriteTest {
     }
 
 
+    @Test
+    void migratePqcParameterSetsThroughCamel418_6() {
+        // the Kyber, Dilithium and SPHINCS+ part comes from 
camel418_6.migratePqcParameterSpecs (4.18.6)
+        rewriteRun(
+                mavenProject("test-pqc-parameter-sets",
+                        CamelTestUtil.pomXmlSpec("camel-pqc", 
CamelTestUtil.CamelVersion.v4_22_1),
+                        //language=java
+                        java(
+                                """
+                                import 
org.bouncycastle.pqc.jcajce.spec.DilithiumParameterSpec;
+                                import 
org.bouncycastle.pqc.jcajce.spec.KyberParameterSpec;
+
+                                public class Defaults {
+                                    private DilithiumParameterSpec dilithium = 
DilithiumParameterSpec.dilithium2;
+                                    private KyberParameterSpec kyber = 
KyberParameterSpec.kyber1024;
+                                }
+                                """,
+                                """
+                                import 
org.bouncycastle.jcajce.spec.MLDSAParameterSpec;
+                                import 
org.bouncycastle.jcajce.spec.MLKEMParameterSpec;
+
+                                public class Defaults {
+                                    private MLDSAParameterSpec dilithium = 
MLDSAParameterSpec.ml_dsa_44;
+                                    private MLKEMParameterSpec kyber = 
MLKEMParameterSpec.ml_kem_1024;
+                                }
+                                """
+                        )
+                )
+        );
+    }
+
+
     @Test
     void preconditionBlocksPqcSpecsWithoutDependency() {
         rewriteRun(
diff --git a/release_notes.adoc b/release_notes.adoc
index 7fe40f7..34429f5 100644
--- a/release_notes.adoc
+++ b/release_notes.adoc
@@ -241,6 +241,10 @@ Patch recipes for Camel 4.18.6 
(`camel418_6.CamelMigrationRecipe`). The backport
 | 
https://github.com/apache/camel/blob/main/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc#camel-pubnub---the-producer-uses-its-configured-channel[camel-pubnub:
 `CamelPubNubOverrideChannel` (CAMEL-25888)]
 | ⚠️ Partial
 | `camel418_6.upgradePubNubOverrideChannel`: `CamelPubNubChannel` -> 
`CamelPubNubOverrideChannel` only where a route sets it (`setHeader` in Java, 
XML and YAML, `Message.setHeader`, `PubNubConstants.CHANNEL`, Endpoint DSL 
`pubNubChannel()`), with the new generic `camel418_6.RenameHeaderWhenSet`; 
reads of the consumer header stay. Gated on `camel-pubnub`. A statically 
imported `CHANNEL` needs a manual fix.
+
+| 
https://github.com/apache/camel/blob/main/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc#camel-pqc---bouncy-castle-185[camel-pqc:
 Bouncy Castle 1.85]
+| ⚠️ Partial
+| `camel418_6.migratePqcParameterSpecs`: `KyberParameterSpec`, 
`DilithiumParameterSpec` and `SPHINCSPlusParameterSpec` of 
`org.bouncycastle.pqc.jcajce.spec` -> `MLKEMParameterSpec`, 
`MLDSAParameterSpec` and `SLHDSAParameterSpec` of 
`org.bouncycastle.jcajce.spec` (`ChangeType`), and their parameter sets -> the 
ones camel-pqc 4.18.6 uses (`kyber768` -> `ml_kem_768`, `dilithium2` -> 
`ml_dsa_44`, `sha2_128s` -> `slh_dsa_sha2_128s`, ...; 
`ReplaceConstantWithAnotherConstant`), gated on `camel- [...]
 |===
 
 NOTE: At the time of writing Camel 4.18.6 was not on Maven Central yet; the 
tests that resolve 4.18.6 artifacts were run against the staging repositories 
of the vote (`orgapachecamel-2094`, `orgapachecamel-2095`).

Reply via email to