si.setSignedInfo(_streamSI);
// si.setCanonicalizedSI(signedInfoBytes);
KeySelectorResult keySelectoResult = null;
try {
sm = si.getSignatureMethod();
if(verificationKey == null){
keySelectoResult = xMLValidateContext.getKeySelector().select(getKeyInfo(),KeySelector.Purpose.VERIFY,sm,xMLValidateContext);
verificationKey = keySelectoResult.getKey();
}
if (verificationKey == null) {
throw new XMLSignatureException("The KeySelector"+ xMLValidateContext.getKeySelector()+ " did not " +
"find the key used for signature verification");
}