Bugfix: avoid opening CAfile when it's NULL.