It's somewhat(?) common for GPL projects to add an exemption to the license to allow it to be linked to openssl. See e.g. https://people.gnome.org/~markmc/openssl-and-the-gpl.html
In other cases, there's the "system library" argument (the GPL contains language that if a library the program links to is a "system library" the GPL "virality" doesn't extend there).
And in yet other cases, people just ignore it.
If you want to play it safe, just use GnuTLS, or Mozilla NSS.
The GPL has an exception for linking with system libraries. It's quite arguable that OpenSSL is one of them. The legal issues are coming from the GPLv2 side, yeah.
> Correct.
Wait, I've tried to do some more reading and there are some things I do not understand:
1. I've done quick search over pacman database, and there are lot of packages that are either gpl or gpl2 that link against openssl. Does that mean that archlinux should be in deep legal trouble and it needs to drop few hundred packages (including coreutils, libgit2, kmod and others). Hell, even git itself links again openssl and that is gpl-2.0-only project. Does this make git illegal?
2. Are the "legal issues" comming from gpl-2.0-only side or from the openssl side? If from the gpl-2.0-only side, cannot I just add linking exception to the license to explicitely allow linking to openssl?