|
|
@ -76,7 +76,7 @@ char genCA[] =
|
|
|
|
"name_opt = ca_default # Subject Name options\n"
|
|
|
|
"name_opt = ca_default # Subject Name options\n"
|
|
|
|
"cert_opt = ca_default # Certificate field options\n"
|
|
|
|
"cert_opt = ca_default # Certificate field options\n"
|
|
|
|
"\n"
|
|
|
|
"\n"
|
|
|
|
"default_days = 365 # how long to certify for\n"
|
|
|
|
"default_days = 730 # how long to certify for\n"
|
|
|
|
"default_crl_days= 30 # how long before next CRL\n"
|
|
|
|
"default_crl_days= 30 # how long before next CRL\n"
|
|
|
|
"default_md = md5 # which md to use.\n"
|
|
|
|
"default_md = md5 # which md to use.\n"
|
|
|
|
"preserve = no # keep passed DN ordering\n"
|
|
|
|
"preserve = no # keep passed DN ordering\n"
|
|
|
@ -333,6 +333,13 @@ char genCert[] =
|
|
|
|
" echo \"Creating new x11vnc certificate and key for name: $type $name0\"\n"
|
|
|
|
" echo \"Creating new x11vnc certificate and key for name: $type $name0\"\n"
|
|
|
|
" echo \"\"\n"
|
|
|
|
" echo \"\"\n"
|
|
|
|
"\n"
|
|
|
|
"\n"
|
|
|
|
|
|
|
|
" req_args=$REQ_ARGS\n"
|
|
|
|
|
|
|
|
" if echo \"$req_args\" | grep 'days' > /dev/null; then\n"
|
|
|
|
|
|
|
|
" :\n"
|
|
|
|
|
|
|
|
" else\n"
|
|
|
|
|
|
|
|
" req_args=\"$req_args -days 730\"\n"
|
|
|
|
|
|
|
|
" fi\n"
|
|
|
|
|
|
|
|
"\n"
|
|
|
|
" cnf=\"$DIR/tmp/cnf.$$\"\n"
|
|
|
|
" cnf=\"$DIR/tmp/cnf.$$\"\n"
|
|
|
|
" trap \"rm -f \\\"$cnf\\\"\" 0 1 2 15\n"
|
|
|
|
" trap \"rm -f \\\"$cnf\\\"\" 0 1 2 15\n"
|
|
|
|
"\n"
|
|
|
|
"\n"
|
|
|
@ -343,7 +350,7 @@ char genCert[] =
|
|
|
|
" direrror \"$DIR/CA/self.cnf.$type\"\n"
|
|
|
|
" direrror \"$DIR/CA/self.cnf.$type\"\n"
|
|
|
|
" fi\n"
|
|
|
|
" fi\n"
|
|
|
|
" cat \"$DIR/CA/self.cnf.$type\" | sed -e \"s/%NAME/$name0/\" > \"$cnf\" || exit 1\n"
|
|
|
|
" cat \"$DIR/CA/self.cnf.$type\" | sed -e \"s/%NAME/$name0/\" > \"$cnf\" || exit 1\n"
|
|
|
|
" \"$OPENSSL\" req -config \"$cnf\" -nodes -new -newkey rsa:2048 -x509 $REQ_ARGS \\\n"
|
|
|
|
" \"$OPENSSL\" req -config \"$cnf\" -nodes -new -newkey rsa:2048 -x509 $req_args \\\n"
|
|
|
|
" -keyout \"$DIR/$dest.key\" \\\n"
|
|
|
|
" -keyout \"$DIR/$dest.key\" \\\n"
|
|
|
|
" -out \"$DIR/$dest.crt\"\n"
|
|
|
|
" -out \"$DIR/$dest.crt\"\n"
|
|
|
|
" else\n"
|
|
|
|
" else\n"
|
|
|
@ -351,7 +358,7 @@ char genCert[] =
|
|
|
|
" direrror \"$DIR/CA/ssl.cnf.$type\"\n"
|
|
|
|
" direrror \"$DIR/CA/ssl.cnf.$type\"\n"
|
|
|
|
" fi\n"
|
|
|
|
" fi\n"
|
|
|
|
" cat \"$DIR/CA/ssl.cnf.$type\" | sed -e \"s/%NAME/$name0/\" > \"$cnf\" || exit 1\n"
|
|
|
|
" cat \"$DIR/CA/ssl.cnf.$type\" | sed -e \"s/%NAME/$name0/\" > \"$cnf\" || exit 1\n"
|
|
|
|
" \"$OPENSSL\" req -config \"$cnf\" -nodes -new -newkey rsa:2048 $REQ_ARGS \\\n"
|
|
|
|
" \"$OPENSSL\" req -config \"$cnf\" -nodes -new -newkey rsa:2048 $req_args \\\n"
|
|
|
|
" -keyout \"$DIR/$dest.key\" \\\n"
|
|
|
|
" -keyout \"$DIR/$dest.key\" \\\n"
|
|
|
|
" -out \"$DIR/$dest.req\"\n"
|
|
|
|
" -out \"$DIR/$dest.req\"\n"
|
|
|
|
" fi\n"
|
|
|
|
" fi\n"
|
|
|
|