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

IllegalArgumentException: Invalid UTF-8 input (for key B0F3710FA64900E7) #61

Closed
pzygielo opened this issue Feb 2, 2020 · 2 comments
Closed
Labels
bug Something isn't working.
Milestone

Comments

@pzygielo
Copy link
Contributor

pzygielo commented Feb 2, 2020

IllegalArgumentException: Invalid UTF-8 input:

[DEBUG] Artifact file: /home/runner/.m2/repository/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar
[DEBUG] Artifact sign: /home/runner/.m2/repository/com/google/auto/value/auto-value-annotations/1.6.3/auto-value-annotations-1.6.3.jar.asc
[INFO] Receive key: https://hkps.pool.sks-keyservers.net/pks/lookup?op=get&options=mr&search=0xB0F3710FA64900E7
	to /home/runner/.m2/repository/pgpkeys-cache/B0/F3/B0F3710FA64900E7.asc
...
Caused by: java.lang.IllegalArgumentException: Invalid UTF-8 input
    at org.bouncycastle.util.Strings.fromUTF8ByteArray (Unknown Source)
    at org.bouncycastle.bcpg.UserIDPacket.getID (Unknown Source)
    at org.bouncycastle.openpgp.PGPPublicKey.getUserIDs (Unknown Source)
    at org.simplify4u.plugins.PublicKeyUtils.getUserIDs (PublicKeyUtils.java:90)
    at org.simplify4u.plugins.PGPVerifyMojo.verifyPGPSignature (PGPVerifyMojo.java:439)
    at org.simplify4u.plugins.PGPVerifyMojo.verifyArtifactSignatures (PGPVerifyMojo.java:370)
    at org.simplify4u.plugins.PGPVerifyMojo.execute (PGPVerifyMojo.java:291)

Full maven log

@slawekjaranowski slawekjaranowski added the bug Something isn't working. label Feb 2, 2020
@slawekjaranowski
Copy link
Member

Bouncy Castle use own implementation of UTF-8 transformation from byte array to string and it is strict for input data, when something is wrong then throws exception.

Now we use standard java mechanism to change byte array to String so when is something wrong in data "question mark" is inserted in output.

This will be better behavior to display information about pgp uid.

Thx for example.

@slawekjaranowski slawekjaranowski added this to the NextRelease milestone Feb 19, 2020
@pzygielo
Copy link
Contributor Author

pzygielo commented Mar 9, 2020

Thanks for the fix and new release 🎉

pzygielo pushed a commit to pzygielo/pgpverify-maven-plugin that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Development

No branches or pull requests

2 participants