+ a_parent->eventDPA(this, response, myNode);
+}
+
+
+anna::U32 ServerSession::getAuthApplicationIdFromCER(const anna::DataBlock &cer, bool &found) const {
+
+ anna::U32 result{};
+ found = true;
+
+ anna::diameter::codec::Message codecMsg; // codec engine to pre-assigned, but will be inferred from ApplicationId during decoding:
+ try { codecMsg.decode(cer); } catch(anna::RuntimeException &ex) { ex.trace(); found = false; return result; }
+
+ // Look at first level:
+ try {
+ result = codecMsg.getAvp(helpers::base::AVPID__Auth_Application_Id)->getUnsigned32()->getValue();
+ }
+ catch(anna::RuntimeException &ex) {
+ found = false;
+ }
+
+ // Look within Vendor-Specific-Application-Id:
+ if (!found) {
+ try {
+ result = codecMsg.getAvp(helpers::base::AVPID__Vendor_Specific_Application_Id)->getAvp(helpers::base::AVPID__Auth_Application_Id)->getUnsigned32()->getValue();
+ }
+ catch(anna::RuntimeException &ex) {
+ found = false;
+ }
+ }
+
+ return result;