Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 3962 invoked from network); 5 Jul 2005 16:14:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jul 2005 16:14:30 -0000 Received: (qmail 33467 invoked by uid 500); 5 Jul 2005 16:14:21 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 33262 invoked by uid 500); 5 Jul 2005 16:14:19 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 33249 invoked by uid 500); 5 Jul 2005 16:14:19 -0000 Received: (qmail 33246 invoked by uid 99); 5 Jul 2005 16:14:19 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 05 Jul 2005 09:14:19 -0700 Received: (qmail 3927 invoked by uid 1526); 5 Jul 2005 16:14:16 -0000 Date: 5 Jul 2005 16:14:16 -0000 Message-ID: <20050705161416.3926.qmail@minotaur.apache.org> From: mturk@apache.org To: jakarta-tomcat-connectors-cvs@apache.org Subject: cvs commit: jakarta-tomcat-connectors/jni/examples mkcerts X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N mturk 2005/07/05 09:14:16 Added: jni/examples mkcerts Log: Add a script for demo self signed certificates. This is for _DEMONSTRATION ONLY_ . Do not use it in real world Revision Changes Path 1.1 jakarta-tomcat-connectors/jni/examples/mkcerts Index: mkcerts =================================================================== #!/bin/sh # # Copyright 1999-2004 The Apache Software Foundation # # Licensed 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. # # # This is the configuration file to treate the CA certificate of the # _DEMONSTRATION ONLY_ 'Coyote' Certificate Authority. # This CA is used to sign the localhost.crt and user.crt # because self-signed server certificates are not accepted by all browsers. # NEVER USE THIS CA YOURSELF FOR REAL LIFE! INSTEAD EITHER USE A PUBLICALLY # KNOWN CA OR CREATE YOUR OWN CA! if [ -z "$OPENSSL" ]; then OPENSSL=openssl; fi PASSPHRASE="pass:secret" GENRSA="$OPENSSL genrsa -des3" REQ="$OPENSSL req -new" CA="$OPENSSL ca" X509="$OPENSSL x509" $OPENSSL rand -out .rnd 8192 $GENRSA -passout $PASSPHRASE -out ca.key -rand .rnd 1024 cat >ca.cfg <localhost.cfg <ca.serial cp /dev/null ca.index fi $CA -passin $PASSPHRASE -batch -config ca.cfg -extensions server_cert -policy server_policy -out x.crt -infiles localhost.csr $X509 -in x.crt -out localhost.crt rm -f x.crt $GENRSA -passout $PASSPHRASE -out user.key -rand .rnd 1024 cat >user.cfg <