openssl: free peer certificate after validating it