justinludwig / jpgpj

Java Pretty Good Privacy Jig
MIT License
75 stars 20 forks source link

Unable to verify signature #11

Closed andreydp closed 6 years ago

andreydp commented 6 years ago

Using pub key from third party to verify signature and getting NPE: java.lang.NullPointerException at org.c02e.jpgpj.Decryptor$Verifier.getSignedBy(Decryptor.java:619) at org.c02e.jpgpj.Decryptor.verify(Decryptor.java:437) at org.c02e.jpgpj.Decryptor.unpack(Decryptor.java:279) at org.c02e.jpgpj.Decryptor.unpack(Decryptor.java:261) at org.c02e.jpgpj.Decryptor.unpack(Decryptor.java:256) at org.c02e.jpgpj.Decryptor.decrypt(Decryptor.java:212) at org.c02e.jpgpj.Decryptor.decrypt(Decryptor.java:168) at com.mytest.TMSEodReportUtils.main(TMSEodReportUtils.java:966) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

justinludwig commented 6 years ago

Thanks for the bug report! I was able to reproduce this bug with a test file that used the older "version 3"-style signature format, and fixed the NPE.