Token extension hangs on its own call while signing using P12 certificate /key

In my token extension when I get a call to sign - (nullable NSData *)tokenSession:(TKTokenSession *)session signData:(NSData *)dataToSign and I call SecKeyCreateSignature() func to get signature it again calls above tokenSession function and hangs there. I am dealing with P12 certification/Key for signing. I am stuck here and need some clues to proceed.

See code stack