| | |
| | | { |
| | | try |
| | | { |
| | | byte[] certBytes = clientCertChain[0].getEncoded(); |
| | | AttributeValue v = |
| | | AttributeValues.create( |
| | | certificateAttributeType, ByteString.wrap(certBytes)); |
| | | |
| | | boolean found = false; |
| | | for (Attribute a : certAttrList) |
| | | { |
| | | if (a.contains(v)) |
| | | { |
| | | found = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (! found) |
| | | ByteString certBytes = ByteString.wrap(clientCertChain[0].getEncoded()); |
| | | if (!find(certAttrList, certBytes)) |
| | | { |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | byte[] certBytes = clientCertChain[0].getEncoded(); |
| | | AttributeValue v = |
| | | AttributeValues.create( |
| | | certificateAttributeType, ByteString.wrap(certBytes)); |
| | | |
| | | boolean found = false; |
| | | for (Attribute a : certAttrList) |
| | | { |
| | | if (a.contains(v)) |
| | | { |
| | | found = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (! found) |
| | | ByteString certBytes = ByteString.wrap(clientCertChain[0].getEncoded()); |
| | | if (!find(certAttrList, certBytes)) |
| | | { |
| | | bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | private boolean find(List<Attribute> certAttrList, ByteString certBytes) |
| | | { |
| | | for (Attribute a : certAttrList) |
| | | { |
| | | if (a.contains(certBytes)) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |