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

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