signature verification of application during secure boot and check condition to jump to DFU or application

Hi guys,

i am using nrf52840 controller. 

and in that i have mbe at 0x0000000 location.

i have two bootloader stage. that boot1 and boot 2.

boot 1 i am using to validate the bootloader 2 using signature verfication.

and once control reached to the boot2 then i want to verifiy the signature of my application and also want to check whether need to stay in dfu mode or should jump to application part.

For Boot2 i am using "nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_bootloader" example code.

Can someone guide me to resolve this