File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ mkdir -p ${DIR}/ssl ${DIR}/htdocs ${DIR}/logs || exit 1
121121# keyUsage = cRLSign, keyCertSign values. This is fine
122122# for most browsers.
123123#
124- serial=$RANDOM
124+ serial=$RANDOM $$
125+
125126openssl req -new -nodes -batch \
126127 -x509 \
127128 -days 10 -subj ' /CN=Da Root/O=SNI testing/' -set_serial $serial \
@@ -134,13 +135,13 @@ mkdir -p ${CDIR}
134135#
135136openssl req -new -nodes -batch \
136137 -x509 \
137- -days 10 -subj ' /CN=Da Second Root/O=SNI user access I/' -set_serial $RANDOM \
138+ -days 10 -subj ' /CN=Da Second Root/O=SNI user access I/' -set_serial 2 $serial $$ \
138139 -keyout ${CDIR} /xs-root-1.key -out ${CDIR} /xs-root-1.pem \
139140 || exit 2
140141
141142openssl req -new -nodes -batch \
142143 -x509 \
143- -days 10 -subj ' /CN=Da Second Root/O=SNI user access II/' -set_serial $RANDOM \
144+ -days 10 -subj ' /CN=Da Second Root/O=SNI user access II/' -set_serial 3 $serial $$ \
144145 -keyout ${CDIR} /xs-root-2.key -out ${CDIR} /xs-root-2.pem \
145146 || exit 2
146147
169170 #
170171 openssl x509 -text -req \
171172 -CA ${CDIR} /xs-root-$i .pem -CAkey ${CDIR} /xs-root-$i .key \
172- -set_serial $RANDOM -in ${CDIR} /client-$i .req -out ${CDIR} /client-$i .pem \
173+ -set_serial 3 $serial $$ -in ${CDIR} /client-$i .req -out ${CDIR} /client-$i .pem \
173174 || exit 4
174175
175176 # And create a pkcs#12 version for easy browser import.
You can’t perform that action at this time.
0 commit comments