Collecting session IDs through an OpenSSL exploit certainly sounds like unauthorized access† to me, so I wouldn't be so quick to say it isn't illegal.
At any rate, it certainly doesn't seem correct to say "it isn't illegal" as a blanket statement.
I would agree that collecting session ids on systems that you do not own or have legitimate access to is almost certainly illegal.