The bogusness is that sslfile really has nothing to do with the state in the context. It simply passes it on to the connection object. So the "fix" belong equally well in the caller of SSL.sslfile(), or in the create function for SSL.connection (probably slightly more motivated there).
Personally, I think the fix belongs in context. It would seem appropriate to set a reasonable value to that element there. I didn't do that because other code (non-sslfile) seemed to work just fine, so in the spirit of not messing with common code I didn't totally understand, it went in sslfile.
There are lots of odd things in the SSL code - it's very old. Without looking in to it I'd say it could just as well be a simple bug in context.pike, but maybe you have specific reasons to believe it's intentional?
As I've found out. I like to think there was a good reason for it being the way it is, though I don't confess to be able to read the author's mind :) The reason I believe it to be intentional is that it's not just defined, it's also set to zero. This tells me that there's a particular reason for not setting it to a function that works.
If we should try to figure out a proper fix, it's good to begin with the specific case where this caused an error for you. What happened?
I wish I could tell you. The only way for me to tell is to revert the change and see what happens, though it's possible it wasn't an all out failure. I'll check out 7.7 to see if it jogs my memory.
Bill