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

  • fb4d03b
  • /
  • 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:6a4b6b922128ea8334415bd87b8582701bd4b78a
directory badge Iframe embedding
swh:1:dir:fb4d03b66a467ea58300a0b90ea3e5d9131615a9
testgen
#!/bin/sh

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

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

PATH=../apps:$PATH;
export PATH

echo "generating certificate request"

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

if ../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."

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

../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