SecretDecoderRing: Logout vs. LogoutAndTeardown

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.

Moderator: satrow

Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Keeps coming back
Keeps coming back
Posts: 912
Joined: 2015-09-08, 22:54

SecretDecoderRing: Logout vs. LogoutAndTeardown

Unread post by Isengrim » 2018-04-14, 15:21

I'm looking at an issue with ChatZilla that has to do with SSL/TLS session caching. I believe I found a work-around for this in the form of two methods in the nsISecretDecoderRing interface: logout and logoutAndTeardown. From what I can tell, both of these methods clear the SSL cache, which solves the issue. (Ideally for my case, there would a way to clear the SSL cache entry for a single connection instead of the entire cache, but it doesn't look like that is possible in the existing codebase.) The difference between the two methods is that logoutAndTeardown also invalidates all secure connections and causes them to close. From a usability standpoint, this is not great when you have multiple SSL sockets and only one of them is acting up due to the aforementioned caching issue.

My question is, in the context of secure sockets, is there any disadvantage to using logout as opposed to logoutAndTeardown?
Linux Mint 19.2 Cinnamon (64-bit), Windows 7 (64-bit), Windows 10 build 1803 (64-bit)
JavaScript is not Java
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story