user story #2174: correct problem with not getting errors

cacerts_getkey should throw some warning messages when it
runs into problem or exceptions.
Add some testing so we can verify our changes is happy.

Change-Id: I43ddd14f214576a1e090eaa36c8c5436dd44e5d3