Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Chris Cunnington
I agree with everything you just said. 

And I'll throw in that I have a weakness for stating things in a tone that is inflammatory. It's a vice of mine. In my defence, I find it extremely difficult to contradict you. I'm sure I come off as a thorn, but owing to your fantastic level of skill, it's hard to take a line like this. 

So let me try another, more mature tack:

Andreas, I think I can safely speak for Lawson when I say we find the inclusion of SSL in Squeak to be extremely exciting. I acknowledge that owing to your almost peerless ability, a programmer like you cannot be moved to do something unless they want to it. The hourly cost to ask you to explore a problem would be staggering. It is therefore delightful that you contribute so many fun projects to Squeak as often as you do almost as though you have a bottomless box of toys which you pour over the community with the appearance of effortlessness. 

Please have a second look at the Mac plugin for SSL, as there may be a problem with it. 
My obstreperousness is exceeded only by the satisfaction I hope to experience using a successful SSL plugin on Squeak. 

Chris 


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Andreas.Raab
On 10/5/2010 11:04 AM, Chris Cunnington wrote:
> Please have a second look at the Mac plugin for SSL, as there may be a
> problem with it.

I did and there was. Since I was using a work machine, I had
accidentally compiled the plugin with the very latest header files
causing the plugin only to work with Cog (or possibly John's very latest
releases) due to the VM_PROXY_MINOR version defined by those headers.

I've recompiled the plugin with the minimal VM_PROXY_MINOR I could get
away with and hopefully the updated binary version will fix your problem.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
  Woot. THanks Raab.


On 10/5/10 5:40 PM, Andreas Raab wrote:

> On 10/5/2010 11:04 AM, Chris Cunnington wrote:
>> Please have a second look at the Mac plugin for SSL, as there may be a
>> problem with it.
>
> I did and there was. Since I was using a work machine, I had
> accidentally compiled the plugin with the very latest header files
> causing the plugin only to work with Cog (or possibly John's very
> latest releases) due to the VM_PROXY_MINOR version defined by those
> headers.
>
> I've recompiled the plugin with the minimal VM_PROXY_MINOR I could get
> away with and hopefully the updated binary version will fix your problem.
>
> Cheers,
>   - Andreas
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
In reply to this post by Andreas.Raab
  On 10/5/10 5:40 PM, Andreas Raab wrote:

> On 10/5/2010 11:04 AM, Chris Cunnington wrote:
>> Please have a second look at the Mac plugin for SSL, as there may be a
>> problem with it.
>
> I did and there was. Since I was using a work machine, I had
> accidentally compiled the plugin with the very latest header files
> causing the plugin only to work with Cog (or possibly John's very
> latest releases) due to the VM_PROXY_MINOR version defined by those
> headers.
>
> I've recompiled the plugin with the minimal VM_PROXY_MINOR I could get
> away with and hopefully the updated binary version will fix your problem.

It now works. Looking at the return stream in the debugger, it seems
that Linden Lab hasn't validated their SSL certificate in a while, so I
get the certificate not valid error which I expected.

I trust them anyway, but not sure how to ignore the error and continue.
Suggestions?


Lawson

Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Andreas.Raab
On 10/5/2010 9:42 PM, Lawson English wrote:
> It now works. Looking at the return stream in the debugger, it seems
> that Linden Lab hasn't validated their SSL certificate in a while, so I
> get the certificate not valid error which I expected.

This may have nothing to do with Lindenlabs. Remember that I said
certificate verification isn't implemented on the Mac (yet). That's why
you get the error.

> I trust them anyway, but not sure how to ignore the error and continue.
> Suggestions?

Set the expected failure mask to -1 (meaning: ignore anything) or use an
error handler and resume it.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Yanni Chiu
In reply to this post by LawsonEnglish
On 06/10/10 12:42 AM, Lawson English wrote:
> On 10/5/10 5:40 PM, Andreas Raab wrote:
>> I've recompiled the plugin with the minimal VM_PROXY_MINOR I could get
>> away with and hopefully the updated binary version will fix your problem.
>
> It now works. Looking at the return stream in the debugger, it seems
> that Linden Lab hasn't validated their SSL certificate in a while, so I
> get the certificate not valid error which I expected.

It now works - on what version of Mac OS X, and on what version of VM,
(i.e. the Squeak 5.8b10 VM mentioned in the other thread) ?


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
  On 10/5/10 11:41 PM, Yanni Chiu wrote:

> On 06/10/10 12:42 AM, Lawson English wrote:
>> On 10/5/10 5:40 PM, Andreas Raab wrote:
>>> I've recompiled the plugin with the minimal VM_PROXY_MINOR I could get
>>> away with and hopefully the updated binary version will fix your
>>> problem.
>>
>> It now works. Looking at the return stream in the debugger, it seems
>> that Linden Lab hasn't validated their SSL certificate in a while, so I
>> get the certificate not valid error which I expected.
>
> It now works - on what version of Mac OS X, and on what version of VM,
> (i.e. the Squeak 5.8b10 VM mentioned in the other thread) ?
>
>
>

Just downloaded the latest version of the plug-in from
http://squeakvm.org/win32/release/SqueakSSL-bin.zip  and put the MacOS
version into the correct spot ala Bernhard's illustration:
http://dl.dropbox.com/u/6204244/SqueakSSL.png

Mac OS X 6.4 (Snow Leopard) and the bog standard VM DLed from the front
page of squeaksource.org (4.1 I think).


Lawson





Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
In reply to this post by Andreas.Raab
  On 10/5/10 10:37 PM, Andreas Raab wrote:
> On 10/5/2010 9:42 PM, Lawson English wrote:
>> It now works. Looking at the return stream in the debugger, it seems
>> that Linden Lab hasn't validated their SSL certificate in a while, so I
>> get the certificate not valid error which I expected.
>
> This may have nothing to do with Lindenlabs. Remember that I said
> certificate verification isn't implemented on the Mac (yet). That's
> why you get the error.
>

Safari complains too when I tested the URL in the browser, but no matter.

>> I trust them anyway, but not sure how to ignore the error and continue.
>> Suggestions?
>
> Set the expected failure mask to -1 (meaning: ignore anything) or use
> an error handler and resume it.
>
>

RIght. I was hoping there was an obvious setting for the quick and dirty
class methods, e.g.: WebClient httpGet: URL failureMask: -1...

Guess I could add that method myself, eh?


Lawson



Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Yanni Chiu
In reply to this post by LawsonEnglish
On 06/10/10 2:55 AM, Lawson English wrote:
> Just downloaded the latest version of the plug-in from
> http://squeakvm.org/win32/release/SqueakSSL-bin.zip and put the MacOS
> version into the correct spot ala Bernhard's illustration:
> http://dl.dropbox.com/u/6204244/SqueakSSL.png

I believe that picture showed "Squeak 5.8b10.app" VM was being used.

> Mac OS X 6.4 (Snow Leopard) and the bog standard VM DLed from the front
> page of squeaksource.org (4.1 I think).

If you mean the squeak.org site, then the Mac VM's I see listed are:

MacOSX (Universal)
ftp://ftp.smalltalkconsulting.com/Squeak 64-32 5.4b2.app.zip

MacOS 7.5.5 to 9.2
http://ftp.squeak.org/3.10/mac/Squeak 3.8.18beta3U.app.zip

I've tried a "ton" of VM's, and I keep getting a failure in
#primitiveSSLCreate. #listLoadedModules does not show any SqueakSSL (e).
Unfortunately, since I don't have Snow Leopard, then I cannot run
"Squeak 5.8b10.app" VM.

So can you confirm which Mac VM you've got it working on?

Thanks.

--
Yanni


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
  On 10/6/10 2:56 PM, Yanni Chiu wrote:

>
> I've tried a "ton" of VM's, and I keep getting a failure in
> #primitiveSSLCreate. #listLoadedModules does not show any SqueakSSL
> (e). Unfortunately, since I don't have Snow Leopard, then I cannot run
> "Squeak 5.8b10.app" VM.
>
> So can you confirm which Mac VM you've got it working on?
>
> Thanks.
>


The one listed under version 4.1 download in the upper right corner of
http://www.squeak.org: http://ftp.squeak.org/4.1/mac/Squeak4.1-mac.zip



Lawson

Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Yanni Chiu
On 06/10/10 6:43 PM, Lawson English wrote:

> On 10/6/10 2:56 PM, Yanni Chiu wrote:
>>
>> I've tried a "ton" of VM's, and I keep getting a failure in
>> #primitiveSSLCreate. #listLoadedModules does not show any SqueakSSL
>> (e). Unfortunately, since I don't have Snow Leopard, then I cannot run
>> "Squeak 5.8b10.app" VM.
>>
>> So can you confirm which Mac VM you've got it working on?
>
> The one listed under version 4.1 download in the upper right corner of
> http://www.squeak.org: http://ftp.squeak.org/4.1/mac/Squeak4.1-mac.zip

Okay, that gets me a "Squeak 4.2.4beta1U.app" VM, which I've tried
before, but I just tried again, and I get #primitiveSSLCreate failure again.

Anybody have any idea what's going on? Here's what I've been doing:
- in a Finder, I select the VM .app, and choose "Show Package Contents"
- in the new Finder window, I navigate through Contents-->Resources
directory, where I see a bunch of other plugin bundles
- I copy the SqueakSSL.bundle directory from the download area, to the
Resources folder
- in an earlier download of SqueakSSL I was seeing '@' in the "ls"
listing (i.e. extended attributes), but I don't see them anymore
- Strangely, SqueakSSL.bundle has a folder icon, whereas the other
plugins have a special icon, which requires another "Show Package
Contents" in order to view its contents.
- Then I drag the Squeak image onto the VM .app, and a Squeak world opens
- I load WebClient and SqueakSSL via Monticello
- this works, I get html content:
     (WebClient httpGet: 'http://www.squeak.org') content.
- this fails in #primitiveSSLCreate
     (WebClient httpGet: 'https://openid.org/home') content.
- I've tried running dapptrace, but the -U option caused the image the
freeze
- I don't know of any other way to get a trace of the system calls,
since strace is not available on the Mac

Any suggestions?


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Eliot Miranda-2
Hi Yanni,

On Wed, Oct 6, 2010 at 5:03 PM, Yanni Chiu <[hidden email]> wrote:
On 06/10/10 6:43 PM, Lawson English wrote:
On 10/6/10 2:56 PM, Yanni Chiu wrote:

I've tried a "ton" of VM's, and I keep getting a failure in
#primitiveSSLCreate. #listLoadedModules does not show any SqueakSSL
(e). Unfortunately, since I don't have Snow Leopard, then I cannot run
"Squeak 5.8b10.app" VM.

So can you confirm which Mac VM you've got it working on?

The one listed under version 4.1 download in the upper right corner of
http://www.squeak.org: http://ftp.squeak.org/4.1/mac/Squeak4.1-mac.zip

Okay, that gets me a "Squeak 4.2.4beta1U.app" VM, which I've tried before, but I just tried again, and I get #primitiveSSLCreate failure again.

Anybody have any idea what's going on? Here's what I've been doing:
- in a Finder, I select the VM .app, and choose "Show Package Contents"
- in the new Finder window, I navigate through Contents-->Resources directory, where I see a bunch of other plugin bundles
- I copy the SqueakSSL.bundle directory from the download area, to the Resources folder
- in an earlier download of SqueakSSL I was seeing '@' in the "ls" listing (i.e. extended attributes), but I don't see them anymore
- Strangely, SqueakSSL.bundle has a folder icon, whereas the other plugins have a special icon, which requires another "Show Package Contents" in order to view its contents.
- Then I drag the Squeak image onto the VM .app, and a Squeak world opens
- I load WebClient and SqueakSSL via Monticello
- this works, I get html content:
   (WebClient httpGet: 'http://www.squeak.org') content.
- this fails in #primitiveSSLCreate
   (WebClient httpGet: 'https://openid.org/home') content.
- I've tried running dapptrace, but the -U option caused the image the freeze
- I don't know of any other way to get a trace of the system calls, since strace is not available on the Mac

Any suggestions?

Have you checked that the plugin loads at all?  i.e. after you get the failure of primitiveSSLCreate and you list plugins is the SSL plugin included?  If not, then there's probably an undefined symbol and you may see an informative error message on the console or maybe able to trace through the plugin loading code to dlopen and get a useful error form that.

HTH
Eliot



Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Yanni Chiu
On 06/10/10 8:30 PM, Eliot Miranda wrote:
> Have you checked that the plugin loads at all?  i.e. after you get the
> failure of primitiveSSLCreate and you list plugins is the SSL plugin
> included?  If not, then there's probably an undefined symbol and you may
> see an informative error message on the console or maybe able to trace
> through the plugin loading code to dlopen and get a useful error form that.

I should have mentioned that:
     SmalltalkImage current listLoadedModules
does not list SqueakSSL.

The only external plugin listed is:
     'LocalePlugin 9 June 2005 (e)'

I don't see any message on the console.

I just tried stepping into the primitive in the image, and got nothing,
so I guess you mean trace the plugin loading with a C-level debugger.
It's been many years since I last fired up a C debugger. I wish there
were a command line argument to enable a verbose trace or something.


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Eliot Miranda-2


On Wed, Oct 6, 2010 at 5:55 PM, Yanni Chiu <[hidden email]> wrote:
On 06/10/10 8:30 PM, Eliot Miranda wrote:
Have you checked that the plugin loads at all?  i.e. after you get the
failure of primitiveSSLCreate and you list plugins is the SSL plugin
included?  If not, then there's probably an undefined symbol and you may
see an informative error message on the console or maybe able to trace
through the plugin loading code to dlopen and get a useful error form that.

I should have mentioned that:
   SmalltalkImage current listLoadedModules
does not list SqueakSSL.

Right.  So it failed to load.
 

The only external plugin listed is:
   'LocalePlugin 9 June 2005 (e)'

I don't see any message on the console.

I just tried stepping into the primitive in the image, and got nothing, so I guess you mean trace the plugin loading with a C-level debugger. It's been many years since I last fired up a C debugger. I wish there were a command line argument to enable a verbose trace or something.

It might seem scary but it's not hard. 
gdb Squeak.app
break dlopen
run

then type "c" (for continue) until the system is up and running (dlopen is used for lots of stuff other than the SSL plugin).  Then run your test above.  "call printCallStack()" will tell you whether you're calling dlopen in the context of an SSL primitive.  When you are in that context  and now do "finish" to finish execution of dlopen.  Then do "printf "%s\n", dlerror()" to read the error message.  It /may/ tell you the undefined symbol.

HTH
Eliot



Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Andreas.Raab
In reply to this post by Yanni Chiu
On 10/6/2010 5:03 PM, Yanni Chiu wrote:

> Anybody have any idea what's going on? Here's what I've been doing:
> - in a Finder, I select the VM .app, and choose "Show Package Contents"
> - in the new Finder window, I navigate through Contents-->Resources
> directory, where I see a bunch of other plugin bundles
> - I copy the SqueakSSL.bundle directory from the download area, to the
> Resources folder
> - in an earlier download of SqueakSSL I was seeing '@' in the "ls"
> listing (i.e. extended attributes), but I don't see them anymore
> - Strangely, SqueakSSL.bundle has a folder icon, whereas the other
> plugins have a special icon, which requires another "Show Package
> Contents" in order to view its contents.
> - Then I drag the Squeak image onto the VM .app, and a Squeak world opens
> - I load WebClient and SqueakSSL via Monticello
> - this works, I get html content:
> (WebClient httpGet: 'http://www.squeak.org') content.
> - this fails in #primitiveSSLCreate
> (WebClient httpGet: 'https://openid.org/home') content.
> - I've tried running dapptrace, but the -U option caused the image the
> freeze
> - I don't know of any other way to get a trace of the system calls,
> since strace is not available on the Mac
>
> Any suggestions?

Did you check execute permissions on the executable?

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
In reply to this post by LawsonEnglish
  On 10/5/10 11:58 PM, Lawson English wrote:

>  On 10/5/10 10:37 PM, Andreas Raab wrote:
>
>> Set the expected failure mask to -1 (meaning: ignore anything) or use
>> an error handler and resume it.
>>
>>
>
> RIght. I was hoping there was an obvious setting for the quick and
> dirty class methods, e.g.: WebClient httpGet: URL failureMask: -1...
>
> Guess I could add that method myself, eh?
>
>

In fact it was as trivial as I would hope. Just took a few more seconds
thought than I had available at midnight.

create accessors:

WebClient>>ignoredCertIssues
"explanation deleted"
     ^certIssues

WebClient>>ignoredCertIssues: reasonsMask
"explanation deleted"
     certIssues := reasonsMask

WebClient>>initialize
add:       self ignoredCertIssues: -1
at the bottom.

in WebClient>>sslConnect:

add:     stream ignoredCertIssues: self ignoredCertIssues.
before:     stream verifyCert: self serverName.


WebClient httpGet: 'https://login.agni.lindenlab.com/cgi-bin/login.cgi'.

Works.



Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

LawsonEnglish
In reply to this post by Andreas.Raab
  Note he's not using Snow Leopard. There might be differences that
no-one else has tested before. Changing permissions wasn't required with
Snow Leopard, it turns out.
L.


On 10/6/10 6:35 PM, Andreas Raab wrote:

> On 10/6/2010 5:03 PM, Yanni Chiu wrote:
>> [...]
>> Any suggestions?
>
> Did you check execute permissions on the executable?
>
> Cheers,
>   - Andreas
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Yanni Chiu
In reply to this post by Andreas.Raab
On 06/10/10 9:35 PM, Andreas Raab wrote:
> Did you check execute permissions on the executable?

Did you mean this executable...

$ cd Squeak\
4.2.4beta1U.app/Contents/Resources/SqueakSSL.bundle/Contents/MacOS
$ ls -l
total 152
-rwxr-xr-x  1 yanni  staff  74000  5 Oct 11:00 SqueakSSL*


Reply | Threaded
Open this post in threaded view
|

Re: Anyone get the SqueakSSL plugin to work under Mac OS X Snow Leopard? Was Re: [ANN] SqueakSSL - a platform interface for SSL/TLS

Eliot Miranda-2


On Wed, Oct 6, 2010 at 6:47 PM, Yanni Chiu <[hidden email]> wrote:
On 06/10/10 9:35 PM, Andreas Raab wrote:
Did you check execute permissions on the executable?

Did you mean this executable...

$ cd Squeak\ 4.2.4beta1U.app/Contents/Resources/SqueakSSL.bundle/Contents/MacOS
$ ls -l
total 152
-rwxr-xr-x  1 yanni  staff  74000  5 Oct 11:00 SqueakSSL*

yes.