You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by di...@apache.org on 2009/03/24 16:39:04 UTC

svn commit: r757851 - /httpd/httpd/trunk/test/make_sni.sh

Author: dirkx
Date: Tue Mar 24 15:39:00 2009
New Revision: 757851

URL: http://svn.apache.org/viewvc?rev=757851&view=rev
Log:
make_sni.sh test -- Accomodate for platforms which do not have RANDOM in their sh(1) implementation - rely on the pid and a not so random prefix

Modified:
    httpd/httpd/trunk/test/make_sni.sh

Modified: httpd/httpd/trunk/test/make_sni.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/make_sni.sh?rev=757851&r1=757850&r2=757851&view=diff
==============================================================================
--- httpd/httpd/trunk/test/make_sni.sh (original)
+++ httpd/httpd/trunk/test/make_sni.sh Tue Mar 24 15:39:00 2009
@@ -121,7 +121,8 @@
 # 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 @@
 #
 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 @@
     #
     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.