Fix crash when certificate read failed (#1189)
Fix crash when certificate read failed (#1189)

Fixes https://github.com/OpenSC/OpenSC/issues/1176
viktorTarasov/OpenSC-SM,hhonkanen/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,metsma/OpenSC,AktivCo/OpenSC,LudovicRousseau/OpenSC,Jakuje/OpenSC,hongquan/OpenSC-main,mouse07410/OpenSC,OpenSC/OpenSC,dengert/OpenSC,fabled/OpenSC,mtrojnar/OpenSC,rickyepoderi/OpenSC,CardContact/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,rickyepoderi/OpenSC,hhonkanen/OpenSC,fabled/OpenSC,rickyepoderi/OpenSC,LudovicRousseau/OpenSC,AktivCo/OpenSC,frankmorgner/OpenSC,mouse07410/OpenSC,LudovicRousseau/OpenSC,dengert/OpenSC,CardContact/OpenSC,AktivCo/OpenSC,metsma/OpenSC,OpenSC/OpenSC,OpenSC/OpenSC,Jakuje/OpenSC,mouse07410/OpenSC,hongquan/OpenSC-main,philipWendland/OpenSC,philipWendland/OpenSC,viktorTarasov/OpenSC-SM,Jakuje/OpenSC,frankmorgner/OpenSC,mtrojnar/OpenSC,metsma/OpenSC,mtrojnar/OpenSC,fabled/OpenSC,hhonkanen/OpenSC,viktorTarasov/OpenSC-SM,dengert/OpenSC,fabled/OpenSC,frankmorgner/OpenSC,CardContact/OpenSC