]> granicus.if.org Git - apache/commitdiff
make_sni.sh test -- Accomodate for platforms which do not have RANDOM in their sh...
authorDirk-Willem van Gulik <dirkx@apache.org>
Tue, 24 Mar 2009 15:39:00 +0000 (15:39 +0000)
committerDirk-Willem van Gulik <dirkx@apache.org>
Tue, 24 Mar 2009 15:39:00 +0000 (15:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757851 13f79535-47bb-0310-9956-ffa450edef68

test/make_sni.sh

index 58ac41a6551cea65defefdda108f5a38cc330356..6d1288acf5e373e505ef75c751fc1d3204fd9df5 100644 (file)
@@ -121,7 +121,8 @@ mkdir -p ${DIR}/ssl ${DIR}/htdocs ${DIR}/logs || exit 1
 # keyUsage = cRLSign, keyCertSign values. This is fine
 # for most browsers.
 #
-serial=$RANDOM
+serial=$RANDOM$$
+
 openssl req -new -nodes -batch \
     -x509  \
     -days 10 -subj '/CN=Da Root/O=SNI testing/' -set_serial $serial \
@@ -134,13 +135,13 @@ mkdir -p ${CDIR}
 #
 openssl req -new -nodes -batch \
     -x509  \
-    -days 10 -subj '/CN=Da Second Root/O=SNI user access I/' -set_serial $RANDOM \
+    -days 10 -subj '/CN=Da Second Root/O=SNI user access I/' -set_serial 2$serial$$\
     -keyout ${CDIR}/xs-root-1.key -out ${CDIR}/xs-root-1.pem  \
     || exit 2
 
 openssl req -new -nodes -batch \
     -x509  \
-    -days 10 -subj '/CN=Da Second Root/O=SNI user access II/' -set_serial $RANDOM \
+    -days 10 -subj '/CN=Da Second Root/O=SNI user access II/' -set_serial 3$serial$$ \
     -keyout ${CDIR}/xs-root-2.key -out ${CDIR}/xs-root-2.pem  \
     || exit 2
 
@@ -169,7 +170,7 @@ do
     #
     openssl x509 -text -req \
         -CA ${CDIR}/xs-root-$i.pem -CAkey ${CDIR}/xs-root-$i.key \
-        -set_serial $RANDOM -in ${CDIR}/client-$i.req -out ${CDIR}/client-$i.pem \
+        -set_serial 3$serial$$ -in ${CDIR}/client-$i.req -out ${CDIR}/client-$i.pem \
                 || exit 4
 
     # And create a pkcs#12 version for easy browser import.