Add script to create demo certificate for SSL

This commit is contained in:
Laurent Destailleur 2009-08-20 01:30:59 +00:00
parent e377b3f242
commit d00794fab6
2 changed files with 23 additions and 7 deletions

View File

@ -71,6 +71,7 @@ Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\";
Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion; Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\mysqltestinstall.bat.install"; DestDir: "{app}\"; Flags: ignoreversion; Source: "build\exe\doliwamp\mysqltestinstall.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir: "{app}\"; Flags: ignoreversion; Source: "build\exe\doliwamp\startdoliwamp_manual_donotuse.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
Source: "build\exe\doliwamp\builddemosslfiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
; PhpMyAdmin, Apache, Php, Mysql ; PhpMyAdmin, Apache, Php, Mysql
; Put here path of Wampserver applications ; Put here path of Wampserver applications
Source: "C:\Program Files\Wamp\apps\phpmyadmin2.10.1\*.*"; DestDir: "{app}\apps\phpmyadmin2.10.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log" Source: "C:\Program Files\Wamp\apps\phpmyadmin2.10.1\*.*"; DestDir: "{app}\apps\phpmyadmin2.10.1"; Flags: ignoreversion recursesubdirs; Excludes: "config.inc.php,wampserver.conf,*.log,*_log"
@ -96,6 +97,9 @@ Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.2.5"; Flags: ignoreversion; Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.2.5"; Flags: ignoreversion;
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion; Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion; Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
Source: "build\exe\doliwamp\ca_demo_dolibarr.crt"; DestDir: "{app}"; Flags: ignoreversion;
Source: "build\exe\doliwamp\ca_demo_dolibarr.key"; DestDir: "{app}"; Flags: ignoreversion;
; Licence ; Licence
Source: "COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion; Source: "COPYRIGHT"; DestDir: "{app}"; Flags: ignoreversion;
@ -148,6 +152,7 @@ var batFile: String;
var mysmtp: String; var mysmtp: String;
var myporta: String; var myporta: String;
var myportas: String;
var myport: String; var myport: String;
var mypass: String; var mypass: String;
@ -267,6 +272,7 @@ begin
mysmtp := Page.Values[0]; mysmtp := Page.Values[0];
myporta := Page.Values[1]; myporta := Page.Values[1];
myportas:= '443';
myport := Page.Values[2]; myport := Page.Values[2];
mypass := Page.Values[3]; mypass := Page.Values[3];
end end
@ -274,6 +280,7 @@ begin
begin begin
mysmtp := smtpServer; mysmtp := smtpServer;
myporta := apachePort; myporta := apachePort;
myportas:= '443';
myport := mysqlPort; myport := mysqlPort;
mypass := newPassword; mypass := newPassword;
end end
@ -281,6 +288,7 @@ begin
// Save parameters to registry // Save parameters to registry
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'smtpServer', mysmtp); RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'smtpServer', mysmtp);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePort', myporta); RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePort', myporta);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'apachePSSL', myportas);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'mysqlPort', myport); RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'mysqlPort', myport);
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'newPassword', mypass); RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp', 'newPassword', mypass);
@ -339,16 +347,19 @@ begin
LoadStringFromFile (srcFile, srcContents); LoadStringFromFile (srcFile, srcContents);
StringChange (srcContents, 'WAMPBROWSER', browser); StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile,srcContents, False); SaveStringToFile(destFile,srcContents, False);
LoadStringFromFile (srcFileH, srcContents); LoadStringFromFile (srcFileH, srcContents);
StringChange (srcContents, 'WAMPBROWSER', browser); StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFileH,srcContents, False); SaveStringToFile(destFileH,srcContents, False);
LoadStringFromFile (srcFileA, srcContents); LoadStringFromFile (srcFileA, srcContents);
StringChange (srcContents, 'WAMPBROWSER', browser); StringChange (srcContents, 'WAMPBROWSER', browser);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFileA,srcContents, False); SaveStringToFile(destFileA,srcContents, False);
end end
@ -438,6 +449,7 @@ begin
StringChange (srcContents, 'WAMPROOT', pathWithSlashes); StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
StringChange (srcContents, 'WAMPPHPVERSION', phpVersion); StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile,srcContents, False); SaveStringToFile(destFile,srcContents, False);
end end
@ -480,6 +492,7 @@ begin
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion); StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion); StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile, srcContents, False); SaveStringToFile(destFile, srcContents, False);
end end
else else
@ -490,6 +503,7 @@ begin
StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion); StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion); StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
StringChange (srcContents, 'WAMPAPACHEPORT', myporta); StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
StringChange (srcContents, 'WAMPAPACHEPSSL', myportas);
SaveStringToFile(destFile, srcContents, False); SaveStringToFile(destFile, srcContents, False);
end end

View File

@ -51,7 +51,6 @@ ServerRoot "WAMPROOT/bin/apache/apache2.2.6"
# #
#Listen 12.34.56.78:80 #Listen 12.34.56.78:80
Listen WAMPAPACHEPORT Listen WAMPAPACHEPORT
Listen WAMPAPACHEPORTSSL
# #
# Dynamic Shared Object (DSO) Support # Dynamic Shared Object (DSO) Support
@ -112,7 +111,7 @@ LoadModule status_module modules/mod_status.so
LoadModule userdir_module modules/mod_userdir.so LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so #LoadModule usertrack_module modules/mod_usertrack.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule ssl_module modules/mod_ssl.so #LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_2.dll" LoadModule php5_module "WAMPROOT/bin/php/phpWAMPPHPVERSION/php5apache2_2.dll"
# #
@ -503,6 +502,8 @@ Include conf/extra/httpd-autoindex.conf
# Various default settings # Various default settings
#Include conf/extra/httpd-default.conf #Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections # Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf #Include conf/extra/httpd-ssl.conf
# #
@ -513,9 +514,8 @@ Include conf/extra/httpd-autoindex.conf
<IfModule ssl_module> <IfModule ssl_module>
SSLRandomSeed startup builtin SSLRandomSeed startup builtin
SSLRandomSeed connect builtin SSLRandomSeed connect builtin
</IfModule>
Listen WAMPAPACHEPSSL
## ##
## SSL Global Context ## SSL Global Context
@ -552,7 +552,7 @@ AddType application/x-pkcs7-crl .crl
## SSL Virtual Host Context ## SSL Virtual Host Context
## ##
<VirtualHost _default_:444> <VirtualHost _default_:WAMPAPACHEPSSL>
# SSL Engine Switch: # SSL Engine Switch:
# Enable/Disable SSL for this virtual host. # Enable/Disable SSL for this virtual host.
@ -560,7 +560,7 @@ SSLEngine on
# General setup for the virtual host # General setup for the virtual host
DocumentRoot "WAMPROOT/www/" DocumentRoot "WAMPROOT/www/"
ServerName localhost:444 ServerName localhost
ServerAdmin admin@localhost ServerAdmin admin@localhost
ErrorLog "WAMPROOT/logs/apache_error_ssl.log" ErrorLog "WAMPROOT/logs/apache_error_ssl.log"
TransferLog "WAMPROOT/logs/apache_transfer_ssl.log" TransferLog "WAMPROOT/logs/apache_transfer_ssl.log"
@ -704,5 +704,7 @@ BrowserMatch ".*MSIE.*" \
</VirtualHost> </VirtualHost>
</IfModule>
Include "WAMPROOT/alias/*"
Include "WAMPROOT/alias/*.conf"