OpenPGP: refactor error handling in pgp_calculate_and_store_fingerprint()
OpenPGP: refactor error handling in pgp_calculate_and_store_fingerprint()

* initialize pointers to NULL
* explicitly compare pointers to NULL
* use LOG_TEST_*() macros instead of explicit coding

LudovicRousseau/OpenSC,dengert/OpenSC,metsma/OpenSC,viktorTarasov/OpenSC-SM,rickyepoderi/OpenSC,LudovicRousseau/OpenSC,hongquan/OpenSC-main,metsma/OpenSC,CardContact/OpenSC,philipWendland/OpenSC,AktivCo/OpenSC,LudovicRousseau/OpenSC,frankmorgner/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,AktivCo/OpenSC,CardContact/OpenSC,frankmorgner/OpenSC,CardContact/OpenSC,philipWendland/OpenSC,AktivCo/OpenSC,hhonkanen/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,dengert/OpenSC,metsma/OpenSC,OpenSC/OpenSC,OpenSC/OpenSC,fabled/OpenSC,viktorTarasov/OpenSC-SM,hhonkanen/OpenSC,hongquan/OpenSC-main,rickyepoderi/OpenSC,Jakuje/OpenSC,hhonkanen/OpenSC,fabled/OpenSC,OpenSC/OpenSC,Jakuje/OpenSC,dengert/OpenSC,viktorTarasov/OpenSC-SM,mouse07410/OpenSC,fabled/OpenSC,mouse07410/OpenSC,philipWendland/OpenSC,rickyepoderi/OpenSC,fabled/OpenSC