Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading the .pvk file #34

Closed
dmodoomsirius opened this issue Feb 12, 2017 · 4 comments
Closed

Error reading the .pvk file #34

dmodoomsirius opened this issue Feb 12, 2017 · 4 comments

Comments

@dmodoomsirius
Copy link

dmodoomsirius commented Feb 12, 2017

I have a .pvk and it says its "Failed to load the private key" even though i have everything specified in the task.

task jsign {
    doLast {
        ant.taskdef(name: 'jsign', classname: 'net.jsign.PESignerTask', classpath: configurations.jsign.asPath)
        ant.jsign(file: '../output/bootstrap/OblivionLauncher.exe',
                  name: 'OblivionLauncher',
                  url:  'http://www.example.com',
                  certfile: '../user.crt',
                  keyfile: '../key.pvk',
                  alias: 'test',
                  storepass: 'LIFE',
                  tsaurl: 'http://timestamp.comodoca.com/authenticode')
    }
}
@dmodoomsirius
Copy link
Author

Looked at the stack trace noticed its getting a java.lang.NullPointerException

Caused by: java.lang.NullPointerException
        at net.jsign.PVK.decrypt(PVK.java:104)
        at net.jsign.PVK.parse(PVK.java:92)
        at net.jsign.PVK.parse(PVK.java:56)
        at net.jsign.PESignerTask.execute(PESignerTask.java:228)

starts happening on that line. I decompiled jsign to look at the line its crashing on.

https://github.com/ebourg/jsign/blob/master/jsign-core/src/main/java/net/jsign/PVK.java#L128

@ebourg
Copy link
Owner

ebourg commented Feb 19, 2017

You get an error because you specified the storepass parameter instead of keypass. That said, the error message is clearly not explicit, I'll try to improve that.

@dmodoomsirius
Copy link
Author

That worked thank you very much!

@ebourg
Copy link
Owner

ebourg commented Feb 20, 2017

Reopening to improve the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants