if(dktHeadrBlock != null) {
if(insertedEkId != null) { //If DKT referes to EK
Element ekElem = secureMessage.getElementById(insertedEkId);
_secHeader.insertBefore(dktHeadrBlock, ekElem.getNextSibling());
} else{
_secHeader.insertHeaderBlock(dktHeadrBlock);
}
}
// insert the SecurityContextToken if any in the Non DKT path
if (!sctTokenInserted && (sct != null) && includeSCT) {
_secHeader.insertHeaderBlock(sct);