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

  • b39655b
  • /
  • test
  • /
  • testgen
Raw File
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.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:524c0d134c89416b8c6715f9977780b5da308471
directory badge Iframe embedding
swh:1:dir:c457fe5222e81f62af66efc4258dea7bf6028038
testgen
#!/bin/sh

T=testcert
KEY=512
CA=../certs/testca.pem

/bin/rm -f $T.1 $T.2 $T.key

if test "$OSTYPE" = msdosdjgpp; then
    PATH=../apps\;$PATH;
else
    PATH=../apps:$PATH;
fi
export PATH

echo "generating certificate request"

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'
  echo "There should be a 2 sequences of .'s and some +'s."
  echo "There should not be more that at most 80 per line"
fi

echo "This could take some time."

rm -f testkey.pem testreq.pem

../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem
if [ $? != 0 ]; then
echo problems creating request
exit 1
fi

../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
if [ $? != 0 ]; then
echo signature on req is wrong
exit 1
fi

exit 0

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

back to top