#!/bin/sh # # vchat-client - alpha version # vchat-keygen - generate certificate signing request for sending to # vchat@vchat.berlin.ccc.de # # changed by cryx # # Copyright (C) 2001 Andreas Kotes # # This program is free software. It can be redistributed and/or modified, # provided that this copyright notice is kept intact. This program is # distributed in the hope that it will be useful, but without any warranty; # without even the implied warranty of merchantability or fitness for a # particular purpose. In no event shall the copyright holder be liable for # any direct, indirect, incidental or special damages arising in any way out # of the use of this software. # # where do we want to store the key? KEYBASE=$1 if [ "x$KEYBASE" = "x" ] ; then KEYBASE=$HOME/.vchat fi # no key? generate one ... if [ ! -e $KEYBASE.key ]; then echo "vchat-keygen: generating RSA key $KEYBASE.key" echo "vchat-keygen: please set passphrase for local security" umask 0077 openssl genrsa -des3 -out $KEYBASE.key 2048 else echo "vchat-keygen: private key $KEYBASE.key exists" fi # no certificate? dump anonymous CA to disk. if [ ! -e $KEYBASE.csr ]; then if [ ! -e $KEYBASE.ca.keyconf ]; then echo "vchat-keygen: generating config-file for self-signing $KEYBASE.ca.keyconf" cat >$KEYBASE.ca.keyconf <