Fix Bug #65538 (cafile now supports stream wrappers)
Add tests for bug #65538