If there is an API for it, use it. Going behind OpenSSL's back means it can break on upgrades.