head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.24
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.22
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.20
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.18
	pgoyette-compat-base:1.2
	perseant-stdc-iso10646:1.2.0.16
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.14
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.12
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.10
	pgoyette-localcount-base:1.2
	netbsd-5-2-3-RELEASE:1.1.1.5
	netbsd-5-1-5-RELEASE:1.1.1.5
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	tls-earlyentropy:1.2.0.6
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-5-2-2-RELEASE:1.1.1.5
	netbsd-5-1-4-RELEASE:1.1.1.5
	netbsd-5-2-1-RELEASE:1.1.1.5
	netbsd-5-1-3-RELEASE:1.1.1.5
	agc-symver:1.2.0.8
	agc-symver-base:1.2
	tls-maxphys-base:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.1.1.5.0.38
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.1.1.5
	netbsd-5-2-RC1:1.1.1.5
	yamt-pagecache-base6:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-5-1-2-RELEASE:1.1.1.5
	netbsd-5-1-1-RELEASE:1.1.1.5
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.4
	yamt-pagecache-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.2
	bouyer-quota2-base:1.2
	matt-nb5-mips64-premerge-20101231:1.1.1.5
	matt-nb5-pq3:1.1.1.5.0.36
	matt-nb5-pq3-base:1.1.1.5
	netbsd-5-1:1.1.1.5.0.34
	netbsd-5-1-RELEASE:1.1.1.5
	netbsd-5-1-RC4:1.1.1.5
	matt-nb5-mips64-k15:1.1.1.5
	netbsd-5-1-RC3:1.1.1.5
	netbsd-5-1-RC2:1.1.1.5
	netbsd-5-1-RC1:1.1.1.5
	netbsd-5-0-2-RELEASE:1.1.1.5
	matt-nb5-mips64-premerge-20091211:1.1.1.5
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.1.1.5
	matt-nb4-mips64-k7-u2a-k9b:1.1.1.5
	matt-nb5-mips64-u1-k1-k5:1.1.1.5
	matt-nb5-mips64:1.1.1.5.0.32
	netbsd-5-0-1-RELEASE:1.1.1.5
	jym-xensuspend-nbase:1.1.1.5
	netbsd-5-0:1.1.1.5.0.30
	netbsd-5-0-RELEASE:1.1.1.5
	netbsd-5-0-RC4:1.1.1.5
	netbsd-5-0-RC3:1.1.1.5
	netbsd-5-0-RC2:1.1.1.5
	jym-xensuspend:1.1.1.5.0.28
	jym-xensuspend-base:1.1.1.5
	netbsd-5-0-RC1:1.1.1.5
	netbsd-5:1.1.1.5.0.26
	netbsd-5-base:1.1.1.5
	matt-mips64-base2:1.1.1.5
	matt-mips64:1.1.1.5.0.24
	mjf-devfs2:1.1.1.5.0.22
	mjf-devfs2-base:1.1.1.5
	netbsd-4-0-1-RELEASE:1.1.1.5
	wrstuden-revivesa-base-3:1.1.1.5
	wrstuden-revivesa-base-2:1.1.1.5
	wrstuden-fixsa-newbase:1.1.1.5
	wrstuden-revivesa-base-1:1.1.1.5
	yamt-pf42-base4:1.1.1.5
	yamt-pf42-base3:1.1.1.5
	hpcarm-cleanup-nbase:1.1.1.5
	yamt-pf42-baseX:1.1.1.5
	yamt-pf42-base2:1.1.1.5
	OPENSSL_SNAP_20080509:1.1.1.5
	wrstuden-revivesa:1.1.1.5.0.20
	wrstuden-revivesa-base:1.1.1.5
	yamt-pf42:1.1.1.5.0.18
	yamt-pf42-base:1.1.1.5
	keiichi-mipv6:1.1.1.5.0.16
	keiichi-mipv6-base:1.1.1.5
	matt-armv6-nbase:1.1.1.5
	matt-armv6-prevmlocking:1.1.1.5
	wrstuden-fixsa-base-1:1.1.1.5
	netbsd-4-0:1.1.1.5.0.14
	netbsd-4-0-RELEASE:1.1.1.5
	cube-autoconf:1.1.1.5.0.12
	cube-autoconf-base:1.1.1.5
	netbsd-4-0-RC5:1.1.1.5
	netbsd-4-0-RC4:1.1.1.5
	netbsd-4-0-RC3:1.1.1.5
	netbsd-4-0-RC2:1.1.1.5
	netbsd-4-0-RC1:1.1.1.5
	matt-armv6:1.1.1.5.0.10
	matt-armv6-base:1.1.1.5
	matt-mips64-base:1.1.1.5
	hpcarm-cleanup:1.1.1.5.0.8
	hpcarm-cleanup-base:1.1.1.5
	netbsd-3-1-1-RELEASE:1.1.1.3
	netbsd-3-0-3-RELEASE:1.1.1.3
	wrstuden-fixsa:1.1.1.5.0.6
	wrstuden-fixsa-base:1.1.1.5
	openssl_0_9_8e:1.1.1.5
	abandoned-netbsd-4-base:1.1.1.5
	abandoned-netbsd-4:1.1.1.5.0.2
	openssl_0_9_8d:1.1.1.5
	netbsd-3-1:1.1.1.3.0.12
	netbsd-3-1-RELEASE:1.1.1.3
	netbsd-3-0-2-RELEASE:1.1.1.3
	netbsd-3-1-RC4:1.1.1.3
	netbsd-3-1-RC3:1.1.1.3
	netbsd-3-1-RC2:1.1.1.3
	netbsd-3-1-RC1:1.1.1.3
	netbsd-4:1.1.1.5.0.4
	netbsd-4-base:1.1.1.5
	netbsd-3-0-1-RELEASE:1.1.1.3
	openssl_0_9_8b:1.1.1.5
	netbsd-3-0:1.1.1.3.0.10
	netbsd-3-0-RELEASE:1.1.1.3
	netbsd-3-0-RC6:1.1.1.3
	netbsd-3-0-RC5:1.1.1.3
	netbsd-3-0-RC4:1.1.1.3
	openssl_0_9_8a:1.1.1.5
	netbsd-3-0-RC3:1.1.1.3
	netbsd-3-0-RC2:1.1.1.3
	netbsd-3-0-RC1:1.1.1.3
	netbsd-2-0-3-RELEASE:1.1.1.3
	netbsd-2-1:1.1.1.3.0.8
	netbsd-2-1-RELEASE:1.1.1.3
	netbsd-2-1-RC6:1.1.1.3
	netbsd-2-1-RC5:1.1.1.3
	netbsd-2-1-RC4:1.1.1.3
	netbsd-2-1-RC3:1.1.1.3
	netbsd-2-1-RC2:1.1.1.3
	netbsd-2-1-RC1:1.1.1.3
	openssl_0_9_7g:1.1.1.5
	openssl_0_9_7f:1.1.1.4
	netbsd-2-0-2-RELEASE:1.1.1.3
	netbsd-3:1.1.1.3.0.6
	netbsd-3-base:1.1.1.3
	netbsd-2-0-1-RELEASE:1.1.1.3
	netbsd-2:1.1.1.3.0.4
	netbsd-2-base:1.1.1.3
	netbsd-2-0-RELEASE:1.1.1.3
	netbsd-2-0-RC5:1.1.1.3
	netbsd-2-0-RC4:1.1.1.3
	netbsd-2-0-RC3:1.1.1.3
	netbsd-2-0-RC2:1.1.1.3
	netbsd-2-0-RC1:1.1.1.3
	netbsd-2-0:1.1.1.3.0.2
	netbsd-2-0-base:1.1.1.3
	openssl_0_9_7d:1.1.1.3
	netbsd-1-6-PATCH002-RELEASE:1.1.1.2.2.1
	netbsd-1-6-PATCH002:1.1.1.2.2.1
	netbsd-1-6-PATCH002-RC4:1.1.1.2.2.1
	netbsd-1-6-PATCH002-RC3:1.1.1.2.2.1
	netbsd-1-6-PATCH002-RC2:1.1.1.2.2.1
	openssl_0_9_7c:1.1.1.3
	netbsd-1-6-PATCH002-RC1:1.1.1.2.2.1
	openssl_0_9_7b:1.1.1.3
	netbsd-1-6-PATCH001:1.1.1.2.2.1
	netbsd-1-6-PATCH001-RELEASE:1.1.1.2.2.1
	netbsd-1-6-PATCH001-RC3:1.1.1.2.2.1
	netbsd-1-6-PATCH001-RC2:1.1.1.2.2.1
	netbsd-1-6-PATCH001-RC1:1.1.1.2.2.1
	fvdl_fs64_base:1.1.1.3
	netbsd-1-6-RELEASE:1.1.1.2.2.1
	netbsd-1-6-RC3:1.1.1.2.2.1
	netbsd-1-6-RC2:1.1.1.2.2.1
	netbsd-1-6-RC1:1.1.1.2.2.1
	openssl_0_9_6g:1.1.1.3
	openssl_0_9_6f:1.1.1.3
	openssl_0_9_6e:1.1.1.3
	openssl_0_9_6d:1.1.1.3
	netbsd-1-6:1.1.1.2.0.2
	netbsd-1-6-base:1.1.1.2
	netbsd-1-5-PATCH003:1.1.1.1.2.1
	netbsd-1-5-PATCH002:1.1.1.1.2.1
	openssl_0_9_6b:1.1.1.2
	netbsd-1-5-PATCH001:1.1.1.1.2.1
	openssl_0_9_6a:1.1.1.2
	netbsd-1-5-RELEASE:1.1.1.1.2.1
	netbsd-1-5-BETA2:1.1.1.1.2.1
	netbsd-1-5-BETA:1.1.1.1.2.1
	netbsd-1-5-ALPHA2:1.1.1.1.2.1
	mrg-post-merge-openssl_0_9_5a:1.1.1.2
	openssl_0_9_5a:1.1.1.2
	minoura-xpg4dl:1.1.1.1.0.4
	minoura-xpg4dl-base:1.1.1.1
	netbsd-1-5:1.1.1.1.0.2
	netbsd-1-5-base:1.1.1.1
	openssl_0_9_4-netbsd-cryptosrc-intl:1.1.1.1
	OPENSSL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2009.07.20.22.56.55;	author christos;	state dead;
branches;
next	1.1;

1.1
date	2000.06.14.22.44.21;	author thorpej;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.06.14.22.44.21;	author thorpej;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.4.1;
next	1.1.1.2;

1.1.1.2
date	2000.07.16.05.09.34;	author mrg;	state Exp;
branches
	1.1.1.2.2.1;
next	1.1.1.3;

1.1.1.3
date	2002.06.09.15.24.44;	author itojun;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2005.03.25.19.11.37;	author christos;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2005.04.23.19.16.26;	author christos;	state Exp;
branches;
next	;

1.1.1.1.2.1
date	2000.07.17.05.59.53;	author mrg;	state Exp;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2002.08.29.16.45.41;	author he;	state Exp;
branches;
next	;

1.1.1.1.4.1
date	2000.06.14.22.44.21;	author thorpej;	state dead;
branches;
next	1.1.1.1.4.2;

1.1.1.1.4.2
date	2000.06.14.22.44.22;	author thorpej;	state Exp;
branches;
next	;

1.1.1.2.2.1
date	2002.08.02.12.05.23;	author lukem;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Don't lets this linger around forever. Causes hidden bugs.
@
text
@#!/bin/sh

digest='-mdc2'
reqcmd="../apps/openssl req"
x509cmd="../apps/openssl x509 $digest"
verifycmd="../apps/openssl verify"
dummycnf="../apps/openssl.cnf"

CAkey="keyCA.ss"
CAcert="certCA.ss"
CAreq="reqCA.ss"
CAconf="CAss.cnf"
CAreq2="req2CA.ss"	# temp

Uconf="Uss.cnf"
Ukey="keyU.ss"
Ureq="reqU.ss"
Ucert="certU.ss"

echo
echo "make a certificate request using 'req'"
$reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a certificate request"
	exit 1
fi
echo
echo "convert the certificate request into a self signed certificate using 'x509'"
$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to self sign a certificate request"
	exit 1
fi

echo
echo "convert a certificate into a certificate request using 'x509'"
$x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' convert a certificate to a certificate request"
	exit 1
fi

$reqcmd -config $dummycnf -verify -in $CAreq -noout
if [ $? != 0 ]; then
	echo first generated request is invalid
	exit 1
fi

$reqcmd -config $dummycnf -verify -in $CAreq2 -noout
if [ $? != 0 ]; then
	echo second generated request is invalid
	exit 1
fi

$verifycmd -CAfile $CAcert $CAcert
if [ $? != 0 ]; then
	echo first generated cert is invalid
	exit 1
fi

echo
echo "make another certificate request using 'req'"
$reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a certificate request"
	exit 1
fi

echo
echo "sign certificate request with the just created CA via 'x509'"
$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to sign a certificate request"
	exit 1
fi

$verifycmd -CAfile $CAcert $Ucert
echo
echo "Certificate details"
$x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert

echo
echo The generated CA certificate is $CAcert
echo The generated CA private key is $CAkey

echo The generated user certificate is $Ucert
echo The generated user private key is $Ukey

/bin/rm err.ss
exit 0
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import OpenSSL 0.9.4 from netbsd-cryptosrc-intl.
@
text
@@


1.1.1.1.4.1
log
@file testss was added on branch minoura-xpg4dl on 2000-06-14 22:44:22 +0000
@
text
@d1 90
@


1.1.1.1.4.2
log
@Import OpenSSL 0.9.4 from netbsd-cryptosrc-intl.
@
text
@a0 90
#!/bin/sh

digest='-mdc2'
reqcmd="../apps/openssl req"
x509cmd="../apps/openssl x509 $digest"
verifycmd="../apps/openssl verify"
dummycnf="../apps/openssl.cnf"

CAkey="keyCA.ss"
CAcert="certCA.ss"
CAreq="reqCA.ss"
CAconf="CAss.cnf"
CAreq2="req2CA.ss"	# temp

Uconf="Uss.cnf"
Ukey="keyU.ss"
Ureq="reqU.ss"
Ucert="certU.ss"

echo
echo "make a certificate request using 'req'"
$reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a certificate request"
	exit 1
fi
echo
echo "convert the certificate request into a self signed certificate using 'x509'"
$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to self sign a certificate request"
	exit 1
fi

echo
echo "convert a certificate into a certificate request using 'x509'"
$x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' convert a certificate to a certificate request"
	exit 1
fi

$reqcmd -config $dummycnf -verify -in $CAreq -noout
if [ $? != 0 ]; then
	echo first generated request is invalid
	exit 1
fi

$reqcmd -config $dummycnf -verify -in $CAreq2 -noout
if [ $? != 0 ]; then
	echo second generated request is invalid
	exit 1
fi

$verifycmd -CAfile $CAcert $CAcert
if [ $? != 0 ]; then
	echo first generated cert is invalid
	exit 1
fi

echo
echo "make another certificate request using 'req'"
$reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a certificate request"
	exit 1
fi

echo
echo "sign certificate request with the just created CA via 'x509'"
$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to sign a certificate request"
	exit 1
fi

$verifycmd -CAfile $CAcert $Ucert
echo
echo "Certificate details"
$x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert

echo
echo The generated CA certificate is $CAcert
echo The generated CA private key is $CAkey

echo The generated user certificate is $Ucert
echo The generated user private key is $Ukey

/bin/rm err.ss
exit 0
@


1.1.1.1.2.1
log
@pull up openssl 0.9.5a (requested by thorpej)
@
text
@d3 1
a3 1
digest='-md5'
d22 1
a22 8

if ../apps/openssl no-rsa; then
  req_new='-newkey dsa:../apps/dsa512.pem'
else
  req_new='-new'
fi

$reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss
d63 1
a63 1
$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss
@


1.1.1.1.2.2
log
@Pull up revision 1.1.1.3 (requested by itojun,he):
  Update OpenSSL to version 0.9.6g.  Includes major version bump for
  libcrypto and all the dependent libraries.
@
text
@a22 2
echo "string to make the random number generator think it has entropy" >> ./.rnd

@


1.1.1.2
log
@OpenSSL 0.9.5a import.
@
text
@d3 1
a3 1
digest='-md5'
d22 1
a22 8

if ../apps/openssl no-rsa; then
  req_new='-newkey dsa:../apps/dsa512.pem'
else
  req_new='-new'
fi

$reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss
d63 1
a63 1
$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss
@


1.1.1.2.2.1
log
@Pull up revision 1.1.1.3 (requested by itojun in ticket #607):
sync to head for openssl 0.9.6e
@
text
@a22 2
echo "string to make the random number generator think it has entropy" >> ./.rnd

@


1.1.1.3
log
@openssl 0.9.6d
@
text
@a22 2
echo "string to make the random number generator think it has entropy" >> ./.rnd

@


1.1.1.4
log
@import openssl-0.9.7f from ftp.openssl.org
@
text
@d3 4
a6 4
digest='-sha1'
reqcmd="../util/shlib_wrap.sh ../apps/openssl req"
x509cmd="../util/shlib_wrap.sh ../apps/openssl x509 $digest"
verifycmd="../util/shlib_wrap.sh ../apps/openssl verify"
d25 1
a25 1
if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then
@


1.1.1.5
log
@from www.openssl.org
@
text
@a19 12
P1conf="P1ss.cnf"
P1key="keyP1.ss"
P1req="reqP1.ss"
P1cert="certP1.ss"
P1intermediate="tmp_intP1.ss"

P2conf="P2ss.cnf"
P2key="keyP2.ss"
P2req="reqP2.ss"
P2cert="certP2.ss"
P2intermediate="tmp_intP2.ss"

d38 1
a38 1
$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey -extfile $CAconf -extensions v3_ca >err.ss
d71 1
a71 1
echo "make a user certificate request using 'req'"
d74 1
a74 1
	echo "error using 'req' to generate a user certificate request"
d79 2
a80 2
echo "sign user certificate request with the just created CA via 'x509'"
$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -extfile $Uconf -extensions v3_ee >err.ss
d82 1
a82 1
	echo "error using 'x509' to sign a user certificate request"
a91 44
echo "make a proxy certificate request using 'req'"
$reqcmd -config $P1conf -out $P1req -keyout $P1key $req_new >err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a proxy certificate request"
	exit 1
fi

echo
echo "sign proxy certificate request with the just created user certificate via 'x509'"
$x509cmd -CAcreateserial -in $P1req -days 30 -req -out $P1cert -CA $Ucert -CAkey $Ukey -extfile $P1conf -extensions v3_proxy >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to sign a proxy certificate request"
	exit 1
fi

cat $Ucert > $P1intermediate
$verifycmd -CAfile $CAcert -untrusted $P1intermediate $P1cert
echo
echo "Certificate details"
$x509cmd -subject -issuer -startdate -enddate -noout -in $P1cert

echo
echo "make another proxy certificate request using 'req'"
$reqcmd -config $P2conf -out $P2req -keyout $P2key $req_new >err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate another proxy certificate request"
	exit 1
fi

echo
echo "sign second proxy certificate request with the first proxy certificate via 'x509'"
$x509cmd -CAcreateserial -in $P2req -days 30 -req -out $P2cert -CA $P1cert -CAkey $P1key -extfile $P2conf -extensions v3_proxy >err.ss
if [ $? != 0 ]; then
	echo "error using 'x509' to sign a second proxy certificate request"
	exit 1
fi

cat $Ucert $P1cert > $P2intermediate
$verifycmd -CAfile $CAcert -untrusted $P2intermediate $P2cert
echo
echo "Certificate details"
$x509cmd -subject -issuer -startdate -enddate -noout -in $P2cert

echo
a97 6
echo The first generated proxy certificate is $P1cert
echo The first generated proxy private key is $P1key

echo The second generated proxy certificate is $P2cert
echo The second generated proxy private key is $P2key

a98 2
#/bin/rm $P1intermediate
#/bin/rm $P2intermediate
@


