boolean ret=false;
HBCIPassportInternal mainPassport=passports.getMainPassport();
if (mainPassport.hasMySigKey()) {
String msgName = msg.getName();
MsgGen gen=handlerdata.getMsgGen();
Node msgNode = msg.getSyntaxDef(msgName, gen.getSyntax());
String dontsignAttr = ((Element)msgNode).getAttribute("dontsign");
if (dontsignAttr.length()==0) {
try {
int numOfPassports=passports.size();
// create an empty sighead and sigtail segment for each required signature
for (int idx=0;idx<numOfPassports;idx++) {
SEG sighead=SEGFactory.getInstance().createSEG("SigHeadUser","SigHead",msgName,numOfPassports-1-idx,gen.getSyntax());
SEG sigtail=SEGFactory.getInstance().createSEG("SigTailUser","SigTail",msgName,idx,gen.getSyntax());
List<MultipleSyntaxElements> msgelements=msg.getChildContainers();
List<SyntaxElement> sigheads=((MultipleSEGs)(msgelements.get(1))).getElements();
List<SyntaxElement> sigtails=((MultipleSEGs)(msgelements.get(msgelements.size()-2))).getElements();