This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch CAMEL-27450-pgp-aes256-sha256 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3ecb451ee0721245a08d0635d916b213e688876a Author: Claus Ibsen <[email protected]> AuthorDate: Mon Nov 23 12:24:34 2026 +0100 CAMEL-27450: camel-crypto-pgp - AES-256 and SHA-256 by default instead of CAST5 and SHA-1 The pgp data format encrypted with CAST5 and signed with the SHA-1 hash unless the algorithm and hashAlgorithm options were set. These defaults date from when the data format was written: CAST5 is a cipher with a 64-bit block, SHA-1 is no longer collision resistant, and current OpenPGP implementations such as GnuPG prefer AES and the SHA-2 hashes. The defaults are now AES-256 (algorithm=9) and SHA-256 (hashAlgorithm=8). The model states them as default values, so the catalog, the XML and YAML DSL schemas and the documentation show them, and the model writers leave them out when a route is dumped. Decrypting and verifying are not affected, as the algorithms of a message are read from the message. A receiver that only supports CAST5 or SHA-1 needs algorithm=3 and hashAlgorithm=2 set on the data format that encrypts or signs; the upgrade guide says so. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/catalog/dataformats/pgp.json | 4 +- .../org/apache/camel/catalog/models/pgp.json | 4 +- .../apache/camel/catalog/schemas/camel-spring.xsd | 8 +- .../apache/camel/catalog/schemas/camel-xml-io.xsd | 8 +- .../camel/catalog/schemas/camelYamlDsl-model.json | 10 +- .../org/apache/camel/converter/crypto/pgp.json | 4 +- .../converter/crypto/PGPKeyAccessDataFormat.java | 8 +- .../crypto/PGPDataFormatDefaultAlgorithmsTest.java | 109 +++++++++++++++++++++ .../org/apache/camel/model/dataformat/pgp.json | 4 +- .../camel/model/dataformat/PGPDataFormat.java | 26 ++--- .../apache/camel/java/out/JavaDslModelWriter.java | 4 +- .../java/org/apache/camel/xml/out/ModelWriter.java | 4 +- .../org/apache/camel/yaml/out/YamlModelWriter.java | 4 +- .../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 33 +++++++ .../dsl/yaml/deserializers/ModelDeserializers.java | 4 +- .../resources/schema/camelYamlDsl-canonical.json | 6 +- .../resources/schema/camelYamlDsl-model.json | 10 +- .../generated/resources/schema/camelYamlDsl.json | 6 +- 18 files changed, 204 insertions(+), 52 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pgp.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pgp.json index 516d48cf50eb..964f2463f935 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pgp.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/pgp.json @@ -33,9 +33,9 @@ "armored": { "index": 8, "kind": "attribute", "displayName": "Armored", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "This option will cause PGP to base64 encode the encrypted text, making it available for copy\/paste, etc." }, "integrity": { "index": 9, "kind": "attribute", "displayName": "Integrity", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Adds an integrity check\/sign into the encryption file." }, "provider": { "index": 10, "kind": "attribute", "displayName": "Provider", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you can use, for example, the IAIK JCE provider." }, - "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." }, + "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 9, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting." }, "compressionAlgorithm": { "index": 12, "kind": "attribute", "displayName": "Compression Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags. Only relevant for encrypting." }, - "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." }, + "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing." }, "signatureVerificationOption": { "index": 14, "kind": "attribute", "displayName": "Signature Verification Option", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Controls the behavior for verifying the signature during unmarshaling. Possible values: optional, required, ignore, no_signature_allowed." }, "requireIntegrityProtection": { "index": 15, "kind": "attribute", "displayName": "Require Integrity Protection", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether a message must be integrity protected in order to be decrypted. The legacy symmetrically encrypted data packet carries no modification detection code, and the packet type is chosen [...] } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pgp.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pgp.json index 977fcad645a1..844e98e9dddd 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pgp.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pgp.json @@ -24,9 +24,9 @@ "armored": { "index": 8, "kind": "attribute", "displayName": "Armored", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "This option will cause PGP to base64 encode the encrypted text, making it available for copy\/paste, etc." }, "integrity": { "index": 9, "kind": "attribute", "displayName": "Integrity", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Adds an integrity check\/sign into the encryption file." }, "provider": { "index": 10, "kind": "attribute", "displayName": "Provider", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you can use, for example, the IAIK JCE provider." }, - "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." }, + "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 9, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting." }, "compressionAlgorithm": { "index": 12, "kind": "attribute", "displayName": "Compression Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags. Only relevant for encrypting." }, - "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." }, + "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing." }, "signatureVerificationOption": { "index": 14, "kind": "attribute", "displayName": "Signature Verification Option", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Controls the behavior for verifying the signature during unmarshaling. Possible values: optional, required, ignore, no_signature_allowed." }, "requireIntegrityProtection": { "index": 15, "kind": "attribute", "displayName": "Require Integrity Protection", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether a message must be integrity protected in order to be decrypted. The legacy symmetrically encrypted data packet carries no modification detection code, and the packet type is chosen [...] } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index 3473501c1931..0d87b0839229 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -9765,8 +9765,8 @@ IAIK JCE provider. <xs:annotation> <xs:documentation xml:lang="en"> <![CDATA[ -Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only -relevant for encrypting. +Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for +example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting. Default value: 9 ]]> </xs:documentation> </xs:annotation> @@ -9785,8 +9785,8 @@ encrypting. <xs:annotation> <xs:documentation xml:lang="en"> <![CDATA[ -Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for -signing. +Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= +SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing. Default value: 8 ]]> </xs:documentation> </xs:annotation> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd index 42adcca3b222..7a7cb4aa5b04 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd @@ -8884,8 +8884,8 @@ IAIK JCE provider. <xs:annotation> <xs:documentation xml:lang="en"> <![CDATA[ -Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only -relevant for encrypting. +Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for +example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting. Default value: 9 ]]> </xs:documentation> </xs:annotation> @@ -8904,8 +8904,8 @@ encrypting. <xs:annotation> <xs:documentation xml:lang="en"> <![CDATA[ -Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for -signing. +Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= +SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing. Default value: 8 ]]> </xs:documentation> </xs:annotation> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json index 483c9736c1d2..8b724bfdacdf 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json @@ -12979,8 +12979,9 @@ "children" : [ { "name" : "algorithm", "type" : "number", - "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting.", - "title" : "Algorithm" + "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.", + "title" : "Algorithm", + "default" : "9" }, { "name" : "armored", "type" : "boolean", @@ -12995,8 +12996,9 @@ }, { "name" : "hashAlgorithm", "type" : "number", - "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing.", - "title" : "Hash Algorithm" + "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.", + "title" : "Hash Algorithm", + "default" : "8" }, { "name" : "id", "type" : "string", diff --git a/components/camel-crypto-pgp/src/generated/resources/META-INF/org/apache/camel/converter/crypto/pgp.json b/components/camel-crypto-pgp/src/generated/resources/META-INF/org/apache/camel/converter/crypto/pgp.json index 516d48cf50eb..964f2463f935 100644 --- a/components/camel-crypto-pgp/src/generated/resources/META-INF/org/apache/camel/converter/crypto/pgp.json +++ b/components/camel-crypto-pgp/src/generated/resources/META-INF/org/apache/camel/converter/crypto/pgp.json @@ -33,9 +33,9 @@ "armored": { "index": 8, "kind": "attribute", "displayName": "Armored", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "This option will cause PGP to base64 encode the encrypted text, making it available for copy\/paste, etc." }, "integrity": { "index": 9, "kind": "attribute", "displayName": "Integrity", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Adds an integrity check\/sign into the encryption file." }, "provider": { "index": 10, "kind": "attribute", "displayName": "Provider", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you can use, for example, the IAIK JCE provider." }, - "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." }, + "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 9, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting." }, "compressionAlgorithm": { "index": 12, "kind": "attribute", "displayName": "Compression Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags. Only relevant for encrypting." }, - "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." }, + "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing." }, "signatureVerificationOption": { "index": 14, "kind": "attribute", "displayName": "Signature Verification Option", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Controls the behavior for verifying the signature during unmarshaling. Possible values: optional, required, ignore, no_signature_allowed." }, "requireIntegrityProtection": { "index": 15, "kind": "attribute", "displayName": "Require Integrity Protection", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether a message must be integrity protected in order to be decrypted. The legacy symmetrically encrypted data packet carries no modification detection code, and the packet type is chosen [...] } diff --git a/components/camel-crypto-pgp/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java b/components/camel-crypto-pgp/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java index 3f51111a400c..afedf42b0e8e 100644 --- a/components/camel-crypto-pgp/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java +++ b/components/camel-crypto-pgp/src/main/java/org/apache/camel/converter/crypto/PGPKeyAccessDataFormat.java @@ -153,9 +153,9 @@ public class PGPKeyAccessDataFormat extends ServiceSupport implements DataFormat private boolean armored; // for encryption private boolean integrity = true; // for encryption - private int hashAlgorithm = HashAlgorithmTags.SHA1; // for signature + private int hashAlgorithm = HashAlgorithmTags.SHA256; // for signature - private int algorithm = SymmetricKeyAlgorithmTags.CAST5; // for encryption + private int algorithm = SymmetricKeyAlgorithmTags.AES_256; // for encryption private int compressionAlgorithm = CompressionAlgorithmTags.ZIP; // for encryption @@ -666,7 +666,7 @@ public class PGPKeyAccessDataFormat extends ServiceSupport implements DataFormat /** * Digest algorithm for signing (marshaling). Possible values are defined in {@link HashAlgorithmTags}. Default - * value is SHA1. + * value is SHA256. */ public void setHashAlgorithm(int hashAlgorithm) { this.hashAlgorithm = hashAlgorithm; @@ -678,7 +678,7 @@ public class PGPKeyAccessDataFormat extends ServiceSupport implements DataFormat /** * Symmetric key algorithm for encryption (marshaling). Possible values are defined in - * {@link SymmetricKeyAlgorithmTags}. Default value is CAST5. + * {@link SymmetricKeyAlgorithmTags}. Default value is AES_256. */ public void setAlgorithm(int algorithm) { this.algorithm = algorithm; diff --git a/components/camel-crypto-pgp/src/test/java/org/apache/camel/converter/crypto/PGPDataFormatDefaultAlgorithmsTest.java b/components/camel-crypto-pgp/src/test/java/org/apache/camel/converter/crypto/PGPDataFormatDefaultAlgorithmsTest.java new file mode 100644 index 000000000000..3a429c3ee83b --- /dev/null +++ b/components/camel-crypto-pgp/src/test/java/org/apache/camel/converter/crypto/PGPDataFormatDefaultAlgorithmsTest.java @@ -0,0 +1,109 @@ +/* + * 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.converter.crypto; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.security.Security; + +import org.apache.camel.Exchange; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.support.DefaultExchange; +import org.bouncycastle.bcpg.HashAlgorithmTags; +import org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.openpgp.PGPCompressedData; +import org.bouncycastle.openpgp.PGPEncryptedDataList; +import org.bouncycastle.openpgp.PGPObjectFactory; +import org.bouncycastle.openpgp.PGPOnePassSignatureList; +import org.bouncycastle.openpgp.PGPPrivateKey; +import org.bouncycastle.openpgp.PGPPublicKeyEncryptedData; +import org.bouncycastle.openpgp.PGPUtil; +import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory; +import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator; +import org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyDataDecryptorFactoryBuilder; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * The {@code pgp} data format encrypts with AES-256 and signs with SHA-256 unless other algorithms are configured. + */ +class PGPDataFormatDefaultAlgorithmsTest { + + private static final String PUB_KEY_RING = "org/apache/camel/component/crypto/pubring.gpg"; + private static final String SEC_KEY_RING = "org/apache/camel/component/crypto/secring.gpg"; + private static final String PASSPHRASE = "sdude"; + private static final String PAYLOAD = "Hello PGP"; + + @BeforeAll + static void installProvider() { + Security.addProvider(new BouncyCastleProvider()); + } + + @Test + void theDefaultsAreAes256AndSha256() { + PGPDataFormat dataFormat = new PGPDataFormat(); + + assertEquals(SymmetricKeyAlgorithmTags.AES_256, dataFormat.getAlgorithm()); + assertEquals(HashAlgorithmTags.SHA256, dataFormat.getHashAlgorithm()); + } + + @Test + void aSignedMessageIsEncryptedWithAes256AndSignedWithSha256() throws Exception { + PGPDataFormat encryptor = new PGPDataFormat(); + encryptor.setKeyFileName(PUB_KEY_RING); + encryptor.setKeyUserid("sdude"); + encryptor.setSignatureKeyFileName(SEC_KEY_RING); + encryptor.setSignatureKeyUserid("sdude"); + encryptor.setSignaturePassword(PASSPHRASE); + + try (DefaultCamelContext context = new DefaultCamelContext()) { + context.start(); + encryptor.start(); + + Exchange exchange = new DefaultExchange(context); + ByteArrayOutputStream encrypted = new ByteArrayOutputStream(); + encryptor.marshal(exchange, PAYLOAD.getBytes(StandardCharsets.UTF_8), encrypted); + + PGPObjectFactory factory = new PGPObjectFactory( + PGPUtil.getDecoderStream(new ByteArrayInputStream(encrypted.toByteArray())), + new BcKeyFingerprintCalculator()); + PGPEncryptedDataList encryptedDataList = (PGPEncryptedDataList) factory.nextObject(); + PGPPublicKeyEncryptedData encryptedData = (PGPPublicKeyEncryptedData) encryptedDataList.get(0); + PGPPrivateKey privateKey = PGPDataFormatUtil.findPrivateKeyWithKeyId(context, SEC_KEY_RING, null, + encryptedData.getKeyID(), PASSPHRASE, null, "BC"); + PublicKeyDataDecryptorFactory decryptorFactory + = new JcePublicKeyDataDecryptorFactoryBuilder().setProvider("BC").build(privateKey); + + assertEquals(SymmetricKeyAlgorithmTags.AES_256, encryptedData.getSymmetricAlgorithm(decryptorFactory)); + + try (InputStream clear = encryptedData.getDataStream(decryptorFactory)) { + PGPObjectFactory clearFactory = new PGPObjectFactory(clear, new BcKeyFingerprintCalculator()); + PGPCompressedData compressed = (PGPCompressedData) clearFactory.nextObject(); + PGPObjectFactory signedFactory + = new PGPObjectFactory(compressed.getDataStream(), new BcKeyFingerprintCalculator()); + PGPOnePassSignatureList signatures = (PGPOnePassSignatureList) signedFactory.nextObject(); + + assertEquals(HashAlgorithmTags.SHA256, signatures.get(0).getHashAlgorithm()); + } + } + } +} diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pgp.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pgp.json index 977fcad645a1..844e98e9dddd 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pgp.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/pgp.json @@ -24,9 +24,9 @@ "armored": { "index": 8, "kind": "attribute", "displayName": "Armored", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "This option will cause PGP to base64 encode the encrypted text, making it available for copy\/paste, etc." }, "integrity": { "index": 9, "kind": "attribute", "displayName": "Integrity", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Adds an integrity check\/sign into the encryption file." }, "provider": { "index": 10, "kind": "attribute", "displayName": "Provider", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you can use, for example, the IAIK JCE provider." }, - "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." }, + "algorithm": { "index": 11, "kind": "attribute", "displayName": "Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 9, "description": "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting." }, "compressionAlgorithm": { "index": 12, "kind": "attribute", "displayName": "Compression Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags. Only relevant for encrypting." }, - "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." }, + "hashAlgorithm": { "index": 13, "kind": "attribute", "displayName": "Hash Algorithm", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 8, "description": "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing." }, "signatureVerificationOption": { "index": 14, "kind": "attribute", "displayName": "Signature Verification Option", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Controls the behavior for verifying the signature during unmarshaling. Possible values: optional, required, ignore, no_signature_allowed." }, "requireIntegrityProtection": { "index": 15, "kind": "attribute", "displayName": "Require Integrity Protection", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether a message must be integrity protected in order to be decrypted. The legacy symmetrically encrypted data packet carries no modification detection code, and the packet type is chosen [...] } diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java index c4f23c2b97f9..a64eb56e44b3 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/PGPDataFormat.java @@ -69,9 +69,9 @@ public class PGPDataFormat extends DataFormatDefinition { @Metadata(description = "Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you can use, for example, the IAIK JCE provider.") private String provider; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", - description = "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags." - + " Only relevant for encrypting.") + @Metadata(javaType = "java.lang.Integer", defaultValue = "9", + description = "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags;" + + " for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.") private String algorithm; @XmlAttribute @Metadata(javaType = "java.lang.Integer", @@ -79,9 +79,9 @@ public class PGPDataFormat extends DataFormatDefinition { + " Only relevant for encrypting.") private String compressionAlgorithm; @XmlAttribute - @Metadata(javaType = "java.lang.Integer", - description = "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags." - + " Only relevant for signing.") + @Metadata(javaType = "java.lang.Integer", defaultValue = "8", + description = "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags;" + + " for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.") private String hashAlgorithm; @XmlAttribute @Metadata(description = "Controls the behavior for verifying the signature during unmarshaling. Possible values: optional, required, ignore, no_signature_allowed.") @@ -329,7 +329,8 @@ public class PGPDataFormat extends DataFormatDefinition { /** * Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example - * 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224). Only relevant for signing. + * 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing. Default is 8 + * (= SHA256). */ public Builder hashAlgorithm(String hashAlgorithm) { this.hashAlgorithm = hashAlgorithm; @@ -338,7 +339,8 @@ public class PGPDataFormat extends DataFormatDefinition { /** * Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example - * 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (=SHA224). Only relevant for signing. + * 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing. Default is 8 + * (= SHA256). */ public Builder hashAlgorithm(int hashAlgorithm) { this.hashAlgorithm = Integer.toString(hashAlgorithm); @@ -402,8 +404,8 @@ public class PGPDataFormat extends DataFormatDefinition { /** * Symmetric key encryption algorithm; possible values are defined in - * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 - * (= DES), 7 (= AES_128). Only relevant for encrypting. + * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 + * (= CAST5). Only relevant for encrypting. Default is 9 (= AES_256). */ public Builder algorithm(String algorithm) { this.algorithm = algorithm; @@ -412,8 +414,8 @@ public class PGPDataFormat extends DataFormatDefinition { /** * Symmetric key encryption algorithm; possible values are defined in - * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= BLOWFISH), 6 - * (= DES), 7 (= AES_128). Only relevant for encrypting. + * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 + * (= CAST5). Only relevant for encrypting. Default is 9 (= AES_256). */ public Builder algorithm(int algorithm) { this.algorithm = Integer.toString(algorithm); diff --git a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java index cad43fc4af3b..b3d22af73c31 100644 --- a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java +++ b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java @@ -3260,9 +3260,9 @@ public class JavaDslModelWriter extends JavaDslModelWriterSupport { doWriteAttribute(sb, "armored", def.getArmored(), "false"); doWriteAttribute(sb, "integrity", def.getIntegrity(), "true"); doWriteAttribute(sb, "provider", def.getProvider(), null); - doWriteAttribute(sb, "algorithm", def.getAlgorithm(), null); + doWriteAttribute(sb, "algorithm", def.getAlgorithm(), "9"); doWriteAttribute(sb, "compressionAlgorithm", def.getCompressionAlgorithm(), null); - doWriteAttribute(sb, "hashAlgorithm", def.getHashAlgorithm(), null); + doWriteAttribute(sb, "hashAlgorithm", def.getHashAlgorithm(), "8"); doWriteAttribute(sb, "signatureVerificationOption", def.getSignatureVerificationOption(), null); doWriteAttribute(sb, "requireIntegrityProtection", def.getRequireIntegrityProtection(), "true"); } diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java index 2f7c33931a24..daaa5c16f110 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java @@ -2626,9 +2626,9 @@ public class ModelWriter extends BaseWriter { doWriteAttribute("armored", def.getArmored(), "false"); doWriteAttribute("integrity", def.getIntegrity(), "true"); doWriteAttribute("provider", def.getProvider(), null); - doWriteAttribute("algorithm", def.getAlgorithm(), null); + doWriteAttribute("algorithm", def.getAlgorithm(), "9"); doWriteAttribute("compressionAlgorithm", def.getCompressionAlgorithm(), null); - doWriteAttribute("hashAlgorithm", def.getHashAlgorithm(), null); + doWriteAttribute("hashAlgorithm", def.getHashAlgorithm(), "8"); doWriteAttribute("signatureVerificationOption", def.getSignatureVerificationOption(), null); doWriteAttribute("requireIntegrityProtection", def.getRequireIntegrityProtection(), "true"); endElement(name); diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java index 3033bab578ed..1383061c3a13 100644 --- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java +++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java @@ -2628,9 +2628,9 @@ public class YamlModelWriter extends YamlModelWriterSupport { doWriteAttribute(jo, "armored", def.getArmored(), "false"); doWriteAttribute(jo, "integrity", def.getIntegrity(), "true"); doWriteAttribute(jo, "provider", def.getProvider(), null); - doWriteAttribute(jo, "algorithm", def.getAlgorithm(), null); + doWriteAttribute(jo, "algorithm", def.getAlgorithm(), "9"); doWriteAttribute(jo, "compressionAlgorithm", def.getCompressionAlgorithm(), null); - doWriteAttribute(jo, "hashAlgorithm", def.getHashAlgorithm(), null); + doWriteAttribute(jo, "hashAlgorithm", def.getHashAlgorithm(), "8"); doWriteAttribute(jo, "signatureVerificationOption", def.getSignatureVerificationOption(), null); doWriteAttribute(jo, "requireIntegrityProtection", def.getRequireIntegrityProtection(), "true"); return jo; diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index ab7ffaa77332..f593ecef90db 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -11199,3 +11199,36 @@ or a negative value, `extendMessageVisibility` was silently ignored. The consumer also logs a warning at startup when `visibilityTimeout` is below 10 seconds, as the extension then has only 1 to 2 seconds before the message becomes visible again. Use a `visibilityTimeout` of 10 seconds or more with `extendMessageVisibility`. + +=== camel-crypto-pgp - AES-256 and SHA-256 are the default algorithms + +The `pgp` data format now encrypts with AES-256 (`algorithm=9`) instead of CAST5 (`algorithm=3`), and signs with the +SHA-256 hash (`hashAlgorithm=8`) instead of SHA-1 (`hashAlgorithm=2`). CAST5 is a cipher with a 64-bit block, and SHA-1 +is no longer collision resistant; current OpenPGP implementations such as GnuPG prefer AES and the SHA-2 hashes. + +Decrypting and verifying are not affected, as the algorithms of a message are read from the message itself: messages +made with CAST5 or SHA-1 are still decrypted and verified. + +A receiver that only supports CAST5 or SHA-1 needs the old values set on the data format that encrypts or signs, for +example in Java with `setAlgorithm(SymmetricKeyAlgorithmTags.CAST5)` and `setHashAlgorithm(HashAlgorithmTags.SHA1)`, +or in XML and YAML with: + +[source,xml] +---- +<marshal> + <pgp keyFileName="pubring.gpg" keyUserid="[email protected]" algorithm="3" hashAlgorithm="2"/> +</marshal> +---- + +[source,yaml] +---- +- marshal: + pgp: + keyFileName: pubring.gpg + keyUserid: [email protected] + algorithm: 3 + hashAlgorithm: 2 +---- + +The `CamelPGPDataFormatEncryptionAlgorithm` and `CamelPGPDataFormatSignatureHashAlgorithm` headers still override +these options for a single message. diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java index c5e09b4ecdce..3824e4012a03 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java @@ -11293,10 +11293,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { description = "Encrypt and decrypt messages using Java Cryptographic Extension (JCE) and PGP", deprecated = false, properties = { - @YamlProperty(name = "algorithm", type = "number", description = "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting.", displayName = "Algorithm"), + @YamlProperty(name = "algorithm", type = "number", defaultValue = "9", description = "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.", displayName = "Algorithm"), @YamlProperty(name = "armored", type = "boolean", defaultValue = "false", description = "This option will cause PGP to base64 encode the encrypted text, making it available for copy/paste, etc.", displayName = "Armored"), @YamlProperty(name = "compressionAlgorithm", type = "number", description = "Compression algorithm; possible values are defined in org.bouncycastle.bcpg.CompressionAlgorithmTags. Only relevant for encrypting.", displayName = "Compression Algorithm"), - @YamlProperty(name = "hashAlgorithm", type = "number", description = "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing.", displayName = "Hash Algorithm"), + @YamlProperty(name = "hashAlgorithm", type = "number", defaultValue = "8", description = "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.", displayName = "Hash Algorithm"), @YamlProperty(name = "id", type = "string", description = "The id of this node", displayName = "Id"), @YamlProperty(name = "integrity", type = "boolean", defaultValue = "true", description = "Adds an integrity check/sign into the encryption file.", displayName = "Integrity"), @YamlProperty(name = "keyFileName", type = "string", description = "Filename of the keyring; must be accessible as a classpath resource (but you can specify a location in the file system by using the file: prefix).", displayName = "Key File Name"), diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json index 32b91b8c7231..b9c86685e328 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json @@ -8196,7 +8196,8 @@ "algorithm" : { "type" : "number", "title" : "Algorithm", - "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." + "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.", + "default" : 9 }, "armored" : { "type" : "boolean", @@ -8212,7 +8213,8 @@ "hashAlgorithm" : { "type" : "number", "title" : "Hash Algorithm", - "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." + "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.", + "default" : 8 }, "id" : { "type" : "string", diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json index 483c9736c1d2..8b724bfdacdf 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json @@ -12979,8 +12979,9 @@ "children" : [ { "name" : "algorithm", "type" : "number", - "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting.", - "title" : "Algorithm" + "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.", + "title" : "Algorithm", + "default" : "9" }, { "name" : "armored", "type" : "boolean", @@ -12995,8 +12996,9 @@ }, { "name" : "hashAlgorithm", "type" : "number", - "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing.", - "title" : "Hash Algorithm" + "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.", + "title" : "Hash Algorithm", + "default" : "8" }, { "name" : "id", "type" : "string", diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json index ef47c6da6f52..4b80c4f93513 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json @@ -10327,7 +10327,8 @@ "algorithm" : { "type" : "number", "title" : "Algorithm", - "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags. Only relevant for encrypting." + "description" : "Symmetric key encryption algorithm; possible values are defined in org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 9 (= AES_256), 8 (= AES_192), 7 (= AES_128), 3 (= CAST5). Only relevant for encrypting.", + "default" : 9 }, "armored" : { "type" : "boolean", @@ -10343,7 +10344,8 @@ "hashAlgorithm" : { "type" : "number", "title" : "Hash Algorithm", - "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags. Only relevant for signing." + "description" : "Signature hash algorithm; possible values are defined in org.bouncycastle.bcpg.HashAlgorithmTags; for example 8 (= SHA256), 9 (= SHA384), 10 (= SHA512), 11 (= SHA224), 2 (= SHA1). Only relevant for signing.", + "default" : 8 }, "id" : { "type" : "string",
