Maven GPG Plugin
  1. Maven GPG Plugin
  2. MGPG-33

Signing fails if passphrase contains non-English letters

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Environment:
      - Mac OSX 10.6.4
      - Maven 2.2.1
      - Java 1.6.0_22
    • Number of attachments :
      0

      Description

      If passphrase contains non-English letters, like , (Scandinavian alphabets) then signing fails.

        Activity

        Hide
        Benjamin Bentmann added a comment -

        Given this is likely an encoding issue, you should also include infos about your local/encoding setup, e.g. the output of mvn -v and locale related environment variables.

        Show
        Benjamin Bentmann added a comment - Given this is likely an encoding issue, you should also include infos about your local/encoding setup, e.g. the output of mvn -v and locale related environment variables.
        Hide
        Harri Halttunen added a comment -

        Here is the result of mvn -v:

        Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)
        Java version: 1.6.0_22
        Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
        Default locale: fi_FI, platform encoding: MacRoman
        OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
        

        If I use gpg from the command line everything works just perfect. For example:

        gpg -ab MyClass.java
        

        gpg will ask for passphrase and everything works as expected. Maven gpg plugin however does not work no matter if I am using -Dgpg.passphrase or let the plugin ask for the passphrase. It started to work similarily than gpg when I removed all the Scandinavian letters from the passphrase.

        One more thing. I noticed that if Ctrl-C is pressed while Maven gpg plugin asks for passphrase all the letters typed to the point when Ctlr-C was pressed are visible.

        Show
        Harri Halttunen added a comment - Here is the result of mvn -v : Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300) Java version: 1.6.0_22 Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: fi_FI, platform encoding: MacRoman OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac" If I use gpg from the command line everything works just perfect. For example: gpg -ab MyClass.java gpg will ask for passphrase and everything works as expected. Maven gpg plugin however does not work no matter if I am using -Dgpg.passphrase or let the plugin ask for the passphrase. It started to work similarily than gpg when I removed all the Scandinavian letters from the passphrase. One more thing. I noticed that if Ctrl-C is pressed while Maven gpg plugin asks for passphrase all the letters typed to the point when Ctlr-C was pressed are visible.
        Hide
        Werner Guttmann added a comment -

        I have got the same problem, but apparently not related to encoding and/or character sets. In other words, my passphrase is all numbers and letters only.

        The problem for my seems to occur only when I try to use -Dgpg.keyname next to -Dgpg.passphrase. Why do I need to do this ? I have got more than on key in my setup, and I would like to use the non-default one.

        Using pgp, I can perfectly well sign any file with the right key using

        > gpg --local-user <some-identity> -ab <filename>
        

        Here's my setup re: Maven:

        C:\Users\me>mvn -v
        Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100)
        Java version: 1.5.0_22, vendor: Sun Microsystems Inc.
        Java home: C:\dev\java\jdk1.5.0_22\jre
        Default locale: de_AT, platform encoding: Cp1252
        OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
        
        Show
        Werner Guttmann added a comment - I have got the same problem, but apparently not related to encoding and/or character sets. In other words, my passphrase is all numbers and letters only. The problem for my seems to occur only when I try to use -Dgpg.keyname next to -Dgpg.passphrase . Why do I need to do this ? I have got more than on key in my setup, and I would like to use the non-default one. Using pgp, I can perfectly well sign any file with the right key using > gpg --local-user <some-identity> -ab <filename> Here's my setup re: Maven: C:\Users\me>mvn -v Apache Maven 3.0.2 (r1056850; 2011-01-09 01:58:10+0100) Java version: 1.5.0_22, vendor: Sun Microsystems Inc. Java home: C:\dev\java\jdk1.5.0_22\jre Default locale: de_AT, platform encoding: Cp1252 OS name: "windows 7" , version: "6.1" , arch: "x86" , family: "windows"
        Hide
        SebbASF added a comment -

        Note that one can use the GPG2 agent to handle passwords.

        Show
        SebbASF added a comment - Note that one can use the GPG2 agent to handle passwords.
        Hide
        Stephen Connolly added a comment -

        Could somebody create a throwaway gpg key based test case? (i.e. create a GPG key that is not yours and you created just for the throw away test case, attach the key, the passphrase for the key, and hopefully a test project that shows the buggy behaviour)

        Show
        Stephen Connolly added a comment - Could somebody create a throwaway gpg key based test case? (i.e. create a GPG key that is not yours and you created just for the throw away test case, attach the key, the passphrase for the key, and hopefully a test project that shows the buggy behaviour)
        Stephen Connolly made changes -
        Field Original Value New Value
        Labels contributers-welcome

          People

          • Assignee:
            Unassigned
            Reporter:
            Harri Halttunen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: