Sorry for replying late on this thread...

> ssl_FindSocket first checks the identity of the layer, so
> it seems that it should fail with the PR_BAD_DESCRIPTOR_ERROR
> if it receives a non-TLS 
> PRFileDesc:http://lxr.mozilla.org/seamonkey/source/security/nss/lib/ssl/sslsock....
>
> 220 ssl_FindSocket(PRFileDesc *fd)
> 221 {
> 222     PRFileDesc *layer;
> 223     sslSocket *ss;
> 224
> 225     PORT_Assert(fd != NULL);
> 226     PORT_Assert(ssl_layer_id != 0);
> 227
> 228     layer = PR_GetIdentitiesLayer(fd, ssl_layer_id);
> 229     if (layer == NULL) {
> 230         PORT_SetError(PR_BAD_DESCRIPTOR_ERROR);
> 231         return NULL;
> 232     }
> 233
> 234     ss = (sslSocket *)layer->secret;
> 235     ss->fd = layer;
> 236     return ss;
> 237 }
>
> Do you know why ssl_FindSocket does not return from line 231 in that
> case?
>

Thanks Wan-teh.  I actually made a few changes to the my code after I
posted this message and now can't seem to revert it back to see the
same segmentation fault.  I guess I might have been doing something
wrong.  I just can't seem to replicate the problem again.

Regards,
Peter

_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to