I think there must be a temporary bug in FreeBSD 13.2. I would wager the problem is either that openssl headers are not compatible with libraries.
IDK, if this is was to be pursued, I would start by searching for SSL_get_peer_certificate and SSL_get1_peer_certificate in header files. I bet there is something like