Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 92033 invoked from network); 30 Oct 2009 15:12:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 15:12:31 -0000 Received: (qmail 38065 invoked by uid 500); 30 Oct 2009 15:12:30 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 38004 invoked by uid 500); 30 Oct 2009 15:12:30 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 37994 invoked by uid 99); 30 Oct 2009 15:12:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 15:12:30 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of riznob@gmail.com designates 209.85.221.196 as permitted sender) Received: from [209.85.221.196] (HELO mail-qy0-f196.google.com) (209.85.221.196) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 15:12:27 +0000 Received: by qyk34 with SMTP id 34so1661901qyk.14 for ; Fri, 30 Oct 2009 08:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=19z5p7th0s7K1Ffa76MAqo+V79pZamA6jUL/hoNaJjg=; b=RXglabEVW40MHXZBUwZI9dOgIqpoBd7FdAQyIFG6w7vD4tlI3sx1O1PGrFWYrOEIF2 z0ks1WOVOxLAwwsKWOUDntVc0hlUyXNspkcbyOG8J2uupKjl9uAXkwds2hjcuFZO2OVo a2cFVl/0ytnm+AtmpMctYu+xZsvGjWqewuU90= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Kaxxh24yWTzlj6gakDAJTRM+OmFMRIA8QyrBgOHesv17wWgGzcGpmwkUvtHCHoC8op rN4AWJblvqltvkC+ahpijnJQXXEfu9If7kCjq7wn3yT6HQxOp6/1xBZw8WzsZdjGkFZx gDRGQpf4MMQKacWXHpCvfxmGKAO9pH2nCiG28= MIME-Version: 1.0 Received: by 10.224.126.212 with SMTP id d20mr1047249qas.118.1256915526870; Fri, 30 Oct 2009 08:12:06 -0700 (PDT) In-Reply-To: <4AD4237B.8010509@gmail.com> References: <4AD4237B.8010509@gmail.com> Date: Fri, 30 Oct 2009 08:12:06 -0700 Message-ID: <7cbc132f0910300812j77827facn928f10308df688f1@mail.gmail.com> Subject: Re: SSL keystore export/import with ant tasks. From: Robert Anderson To: Ant Users List Content-Type: multipart/alternative; boundary=0016e64af61e7dea060477287362 --0016e64af61e7dea060477287362 Content-Type: text/plain; charset=UTF-8 I don't believe there is a way to do this with pure Ant currently. As you mention, options are exec task or write your own task. The key to writing your own taks would be to find a java implementation of keytool. -Rob Anderson On Mon, Oct 12, 2009 at 11:51 PM, Max Danielsson wrote: > Hi, I've been spending some time migrating most of a building environment > over to ant to provide a simpler and cross-system building solution for a > client/server java application and i got kinda stuck at one particular step > when it comes to creating SSL keys. > > I found the wonderful task Genkey for creating SSL key stores and adding > certificates into them. This tool was simple enough for me to understand and > execute, but when it comes to exporting one certificate from one store and > putting it in another, i can't seem to find any ant task that is suitable > for my need. > > The current temporary solution is to use the exec task to execute keytools > to do this for me, something that does work, but isn't the prettiest > solution. So, for clarity the keytool steps for exporting and importing > certificates in already existing stores are as follows (And if i'm doing > something blatantly wrong, please correct me.). > > *keytool -export -keystore server.store -storepass server -alias Server > -file server.cer > keytool -import -alias Server -file server.cer -keystore client.store > -storepass nmsclient > > keytool -export -keystore client.store -storepass client -alias Client > -file client.cer > keytool -import -alias Client -file client.cer -keystore server.store > -storepass server* > > What i'm wondering if it's possible ( That is without creating my own > custom task ) to do this with an pure ant task. > > Best regards MB-JD. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > -- Rob Anderson riznob@gmail.com --0016e64af61e7dea060477287362--