/**
* Add a BinarySecurityToken
*/
private void addBST(X509Certificate[] certs) throws WSSecurityException {
if (!useSingleCert) {
bstToken = new PKIPathSecurity(document);
((PKIPathSecurity) bstToken).setX509Certificates(certs, crypto);
} else {
bstToken = new X509Security(document);
((X509Security) bstToken).setX509Certificate(certs[0]);
}