~sil2100/ubuntu-system-image/server_si-nondestructive

« back to all changes in this revision

Viewing changes to lib/systemimage/gpg.py

  • Committer: Stéphane Graber
  • Date: 2013-06-13 14:05:19 UTC
  • Revision ID: stgraber@ubuntu.com-20130613140519-hlp6vpium6wktxsc
Move the GPG and SSH keys under secret/ to match what we do for cdimage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
def sign_file(key, path, destination=None, detach=True, armor=True):
55
55
    """
56
56
        Sign a file and publish the signature.
57
 
        The key parameter must be a valid key unders gpg/keys/.
 
57
        The key parameter must be a valid key unders secret/gpg/keys/.
58
58
        The path must be that of a valid file.
59
59
        The destination defaults to <path>.gpg (non-armored) or
60
60
        <path>.asc (armored).
62
62
        detached signatures and base64 armoring.
63
63
    """
64
64
 
65
 
    key_path = "%s/%s" % (os.environ.get("KEY_PATH", "gpg/keys"), key)
 
65
    key_path = "%s/%s" % (os.environ.get("KEY_PATH", "secret/gpg/keys"), key)
66
66
 
67
67
    if not os.path.isdir(key_path):
68
68
        raise IndexError("Invalid GPG key name '%s'." % key)
112
112
 
113
113
    def __init__(self, keyring_name):
114
114
        keyring_path = "%s/%s" % (os.environ.get("KEYRING_PATH",
115
 
                                                 "gpg/keyrings"),
 
115
                                                 "secret/gpg/keyrings"),
116
116
                                  keyring_name)
117
117
 
118
118
        if not os.path.isdir(keyring_path):