GlobalPlatformPro icon indicating copy to clipboard operation
GlobalPlatformPro copied to clipboard

CLI 'put-key' option gives error with joptsimple.OptionArgumentConversionException error

Open gwachob opened this issue 2 years ago • 2 comments

On HEAD (starting around e27d37f5487264524f5a966df7743572bff66f8b I thinik), the put-key option seems broken.

Any invocation (java -jar gp.jar) seems to result in something like the following stack trace (tried with JDK 8, JDK 11):

Error: Cannot parse argument 'keys/dap.pem' of option put-key
joptsimple.OptionArgumentConversionException: Cannot parse argument 'keys/dap.pem' of option put-key
	at joptsimple.AbstractOptionSpec.convertWith(AbstractOptionSpec.java:92)
	at joptsimple.ArgumentAcceptingOptionSpec.convert(ArgumentAcceptingOptionSpec.java:277)
	at joptsimple.OptionSet.valuesOf(OptionSet.java:223)
	at joptsimple.OptionSet.valueOf(OptionSet.java:172)
	at pro.javacard.gp.GPTool.run(GPTool.java:435)
	at pro.javacard.gp.GPTool.main(GPTool.java:148)
Caused by: joptsimple.internal.ReflectionException: java.lang.IllegalAccessException: class joptsimple.internal.Reflection cannot access a member of class pro.javacard.gp.Key with modifiers "public static"
	at joptsimple.internal.Reflection.reflectionException(Reflection.java:140)
	at joptsimple.internal.Reflection.invoke(Reflection.java:118)
	at joptsimple.internal.MethodInvokingValueConverter.convert(MethodInvokingValueConverter.java:48)
	at joptsimple.internal.Reflection.convertWith(Reflection.java:124)
	at joptsimple.AbstractOptionSpec.convertWith(AbstractOptionSpec.java:90)
	... 5 more
Caused by: java.lang.IllegalAccessException: class joptsimple.internal.Reflection cannot access a member of class pro.javacard.gp.Key with modifiers "public static"

gwachob avatar Jun 02 '22 05:06 gwachob

I'm not the only one seeing this issue, right?

gwachob avatar Jun 07 '22 22:06 gwachob

Can you replicate this with "next" branch?

martinpaljak avatar Sep 10 '22 04:09 martinpaljak