Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10F69C45B for ; Fri, 14 Nov 2014 09:58:47 +0000 (UTC) Received: (qmail 17944 invoked by uid 500); 14 Nov 2014 09:58:46 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 17893 invoked by uid 500); 14 Nov 2014 09:58:46 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 17881 invoked by uid 99); 14 Nov 2014 09:58:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 09:58:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of emc2fpf@googlemail.com designates 209.85.216.179 as permitted sender) Received: from [209.85.216.179] (HELO mail-qc0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 09:58:21 +0000 Received: by mail-qc0-f179.google.com with SMTP id c9so1930452qcz.38 for ; Fri, 14 Nov 2014 01:58:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=qCTcS0GUNk6rTsj4R+91gpS95t5X2TdDxaIfdjhVAQk=; b=XKvjbAiumIPs0Iojx8J8DUXdsRSDbH8z6V+I+u8hD0w3kDGuwKJKfp5wuXi1mjBXu/ LfKEt1pVGERgNYY6ZgK9/Zn/euBnWfXMTjICYczI27YvEh08jT28Ibfr1tkUF8Fe/oSU M9/QhPxx0Jjoa5nztWXj2dOD2OKaPUNJ5DexO16sCM3SaQi3AuzSXpgVFUuE6ZmVi4+v nLqIWV9Hik9NSoj7po0lFQb4ThVMsPPXfIdaUQYl+zy5Aw0xo8gczyb8drWyXD1TVH7X r6Zzcvgy2Kv+Vt4BO9rbw1Jry16Dix3B6SSjei9WHCSYoS8X13AUwzPfLFqJOfcbx5RK 1ZCQ== MIME-Version: 1.0 X-Received: by 10.224.93.18 with SMTP id t18mr10192083qam.102.1415959099896; Fri, 14 Nov 2014 01:58:19 -0800 (PST) Received: by 10.140.178.15 with HTTP; Fri, 14 Nov 2014 01:58:19 -0800 (PST) In-Reply-To: References: Date: Fri, 14 Nov 2014 10:58:19 +0100 Message-ID: Subject: Re: XmlSecurity Endpoint: Adding KeyValue as KeyInfo child in signature From: Franz Paul Forsthofer To: users@camel.apache.org Content-Type: multipart/alternative; boundary=089e0149c9b42a7a020507ceab2e X-Virus-Checked: Checked by ClamAV on apache.org --089e0149c9b42a7a020507ceab2e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello Gonzalo V=C3=A0squez, KeyValue: PublicKey key =3D cert.getPublicKey(); KeyValue keyInfoFactory.newKeyValue(key); List keyInfoContent =3D new ArrayList(1)); if (keyValue !=3D null) { keyInfoContent.add(keyValue); } KeyInfo keyInfo =3D keyInfoFactory.newKeyInfo(keyInfoContent, keyInfoId) Additional References: see http://camel.apache.org/xml-security-component.html and there in the chapter "Signing Option" you find the option 'properties': "For adding additional References and Objects to the XML signature which contain additional properties, you can provide a bean which implements the XmlSignatureProperties interface." Line breaks: Here I have no solution. The component uses Apache Santuario or the JSR105 implementation of the JRE. Mybe you can find more information in the Santuario spec. Regards Franz On Wed, Nov 12, 2014 at 9:29 PM, Gonzalo Vasquez wrote= : > Dear list members, > > Can you please provide me hints on how to improve my current keyAccesor > to achieve adding the KeyValue node in the KeyInfo element? > > Regarding the base64 encoded parts, how can I force the linebreaks to > avoid never-ending lines? > > I'm also missing a Reference element in the SignedInfo, and don't know > how to add it. > > Any additional comments would also be appreciated. > > Please see attached files: > > 1.- signed.xml: current output format > 2.- signed2.xml: desired format > 3.- spring-ws-servlet.xml: current spring/camel config > 4.- Java Files: KeyAccesor / Selector > Gonzalo V=C3=A1squez S=C3=A1ez > Gerente Investigaci=C3=B3n y Desarrollo (R&D) > Altiuz Soluciones Tecnol=C3=B3gicas de Negocios Ltda. > Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099 > +56 2 335 2461 > gvasquez@altiuz.cl > http://www.altiuz.cl > http://www.altiuzreports.com > > > > > > > > --089e0149c9b42a7a020507ceab2e--