Backmerged [CXF-4897]: check certificates array for null and 0 length

git-svn-id: https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes@1460170 13f79535-47bb-0310-9956-ffa450edef68