Using SqueakSSL with Seaside

Update: I have included instructions for Pharo along the way.
Update: There is now a separate post with Windows instructions.

With the SqueakSSL work progressing nicely, it’s time to look at having it integrated with Seaside so here is a quick tutorial about how to get SqueakSSL going with Seaside 3.0. The integration is pretty straightforward, but the setup can be a bit daunting since there are several pieces to it. Let’s get started:

Step 1: Download Squeak 4.1 and Seaside 3.0rc
First off, we’re going to use Squeak 4.1 with Seaside 3.0rc on Ubuntu (since this is the only tested server configuration at this point). To download Squeak 4.1 with Seaside 3.0rc fetch the Seaside 3.0 Easy-Install from Squeak.org. Unzip the contents into a place of your choice and make sure you can run Seaside by cd-ing into the “Seaside 3.0.app” directory and launching “./squeak.sh”. This should bring up the Welcome screen shown here:

Seaside Welcome Screen

Seaside Welcome Screen

If you want to use Pharo you should fetch the Seaside OneClick image from the Seaside web site.

Step 2: Download and install the SqueakSSL plugin
Download the binary version of the plugin and extract it. Copy the plugin from “SqueakSSL-bin/unix/so.SqueakSSL” into the directory “Seaside 3.0.app/Contents/Linux-i686/lib/squeak/4.0.3-2202”. The plugin (so.SqueakSSL) should now be next to many other plugins in the same directory all called “so.XXX”.

Step 3: Install SqueakSSL and WebClient
Next, go back to your Seaside image, open a workspace and in the workspace evaluate the following code to install SqueakSSL and WebClient:

(Installer ss)
	project: 'SqueakSSL';
		install: 'SqueakSSL-Core';
		install: 'SqueakSSL-Tests';
	project: 'WebClient';
		install: 'WebClient-Core';
		install: 'WebClient-Tests';
		install: 'WebClient-Seaside'.

For Pharo users, you need an additional package (WebClient-Pharo) and you’ll want to use Gofer, like here:

(Gofer new)
	squeaksource: 'SqueakSSL';
		package: 'SqueakSSL-Core';
		package: 'SqueakSSL-Tests';
	squeaksource: 'WebClient';
		package: 'WebClient-Core';
		package: 'WebClient-Tests';
		package: 'WebClient-Pharo';
		package: 'WebClient-Seaside';
	load.

Step 4: Setting up Seaside
First thing, make sure you close the existing Seaside Control Panel and open a new one via world menu, “open…”, “Seaside Control Panel”. In the control panel, choose “Add adaptor…” and select “WAWebServerAdaptor” (this should be the last item in this list). Choose port 8443 (or any other convenient port) and accept. Select the adaptor in the control panel and right-click to get the context menu. In the context menu select “Use SSL (https)…” (if you cannot find the menu item, you haven’t closed and reopened the control panel, so go ahead and do that now):

Enabling SqueakSSL in Seaside

Enabling SqueakSSL in Seaside

SqueakSSL requires a certificate to be used with this instance. Enter the full path to the .pem file which must include both the certificate and the private key. You can create .pem files using the openssl tool chain. Once you’ve entered the certificate path, accept the dialog.

Step 5: Trying it all out
Start the adaptor if you hadn’t done this earlier and point your web browser to https://localhost:8443/ At this point there are several ways in which your browser might react:

  • The browser complains that “the connection was reset”. This almost always means that there is some issue with your cert. Check the command line output to see if it says something relevant such as “file not found” or similar.
  • The browser complains that “the connection is untrusted”. That means your certificate is either self-signed or it doesn’t match the host name. Both are expected outcomes, you should tell the browser to proceed and add an exception for this site.
  • The browser complains that “the page is partially encrypted”. That means some contents on the page is using http instead of https. You should ignore this warning (it’s a bug in the welcome page that should be fixed in Seaside 3.0 final).

But once you’re through with all of these issues you should be able to browse your site like here:

Seaside and SqueakSSL

Seaside and SqueakSSL

Congrats! At this point SqueakSSL and Seaside are happily running together. You should be able to browse your site with no restrictions.

Advertisement

%d bloggers like this: