The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Imported GnuPG keys not working, help

Discussion in 'General Discussion' started by boon4376, Sep 29, 2010.

  1. boon4376

    boon4376 Registered

    Joined:
    Sep 29, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    When I import a GnuPG key, i cant do anything with it with my scripts. Just nothing happens. If I generate the key inside CPANEL, my script works fine.

    if I generate a key in CPANEL, delete it, and re-import it, it doesn't work... Imported keys are not working for me for some reason.

    I am encrypting a file that I will need to send and I need to get my clients GnuPG key installed on my server...

    I am using PHP:
    echo shell_exec("gpg -e -r $recipient $file");

    Anyone experience this problem before?
     
  2. boon4376

    boon4376 Registered

    Joined:
    Sep 29, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    SOLVED

    I found the problem. When importing keys in CPANEL, they are not signed. If using SSH, it asks you if you are sure you want to use the unverified key and you can type "y"... In PHP you cannot confirm this and it never executes... and it never tells you this either.

    The key must be "signed" and then the script will execute without asking.

    I needed to sign the key with this command in ssh
    "gpg --sign-key [recipient]"
     
Loading...

Share This Page