Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision ce052c8437fb97cbc57f034fa94b5bcd749dbf52 authored by Matt Caswell on 03 December 2015, 14:56:22 UTC, committed by Matt Caswell on 03 December 2015, 14:56:22 UTC
Prepare for 1.0.0t release
Reviewed-by: Richard Levitte <levitte@openssl.org>
1 parent a402b2b
  • Files
  • Changes
  • 9a1b74b
  • /
  • test
  • /
  • testss
Raw File
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier None into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier None as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:ce052c8437fb97cbc57f034fa94b5bcd749dbf52 into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:ce052c8437fb97cbc57f034fa94b5bcd749dbf52 as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • content
revision badge
swh:1:rev:ce052c8437fb97cbc57f034fa94b5bcd749dbf52
content badge Iframe embedding
swh:1:cnt:1a426857d31e16569867a24c11b1006a14db92ec
testss
#!/bin/sh

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"
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"

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"

echo
echo "make a certificate request using 'req'"

echo "string to make the random number generator think it has entropy" >> ./.rnd

if ../util/shlib_wrap.sh ../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
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 -extfile $CAconf -extensions v3_ca >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 a user certificate request using 'req'"
$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss
if [ $? != 0 ]; then
	echo "error using 'req' to generate a user certificate request"
	exit 1
fi

echo
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
if [ $? != 0 ]; then
	echo "error using 'x509' to sign a user certificate request"
	exit 1
fi

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

echo
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
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

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

/bin/rm err.ss
#/bin/rm $P1intermediate
#/bin/rm $P2intermediate
exit 0
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top