signing
index
/home/aki/wrk/git-mozharness-ro/mozharness/base/signing.py

Generic signing methods.

 
Modules
       
getpass
hashlib
os
re
subprocess

 
Classes
       
__builtin__.object
AndroidSigningMixin
BaseSigningMixin

 
class AndroidSigningMixin(__builtin__.object)
    Generic Android apk signing methods.
 
Dependent on BaseScript.
 
  Methods defined here:
align_apk(self, unaligned_apk, aligned_apk, error_level='error')
Zipalign apk.
Returns None on success, not None on failure.
passphrase(self)
postflight_passphrase(self)
sign_apk(self, apk, keystore, storepass, keypass, key_alias, remove_signature=True, error_list=None, log_level='info', error_level='error')
Signs an apk with jarsigner.
unsign_apk(self, apk, **kwargs)
verify_passphrases(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
key_passphrase = None
store_passphrase = None

 
class BaseSigningMixin(__builtin__.object)
    Generic signing helper methods.
 
  Methods defined here:
query_filesize(self, file_path)
query_sha512sum(self, file_path)
# TODO this should be parallelized with the to-be-written BaseHelper!

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        DEBUG = 'debug'
ERROR = 'error'
FATAL = 'fatal'
IGNORE = 'ignore'
INFO = 'info'
JarsignerErrorList = [{'level': 'fatal', 'substr': 'command not found'}, {'explanation': 'The store passphrase is probably incorrect!', 'level': 'fatal', 'substr': 'jarsigner error: java.lang.RuntimeException: key...tore was tampered with, or password was incorrect'}, {'explanation': 'The key passphrase is probably incorrect!', 'level': 'fatal', 'regex': <_sre.SRE_Pattern object at 0x8252ba8>}, {'explanation': "The keystore doesn't exist!", 'level': 'fatal', 'regex': <_sre.SRE_Pattern object at 0x82a62e8>}, {'explanation': 'The apk is missing!', 'level': 'fatal', 'substr': 'jarsigner: unable to open jar file:'}]
TestJarsignerErrorList = [{'level': 'ignore', 'substr': 'jarsigner: unable to open jar file:'}, {'level': 'fatal', 'substr': 'command not found'}, {'explanation': 'The store passphrase is probably incorrect!', 'level': 'fatal', 'substr': 'jarsigner error: java.lang.RuntimeException: key...tore was tampered with, or password was incorrect'}, {'explanation': 'The key passphrase is probably incorrect!', 'level': 'fatal', 'regex': <_sre.SRE_Pattern object at 0x8252ba8>}, {'explanation': "The keystore doesn't exist!", 'level': 'fatal', 'regex': <_sre.SRE_Pattern object at 0x82a62e8>}, {'explanation': 'The apk is missing!', 'level': 'fatal', 'substr': 'jarsigner: unable to open jar file:'}]
UnsignApkErrorList = [{'explanation': 'This apk is already unsigned.', 'level': 'info', 'regex': <_sre.SRE_Pattern object at 0x823d758>}, {'level': 'ignore', 'substr': 'zip error: Nothing to do!'}, {'level': 'error', 'substr': 'command not found'}, {'level': 'warning', 'substr': 'zip warning:'}, {'level': 'error', 'substr': 'zip error:'}, {'level': 'error', 'substr': 'Cannot open file: it does not appear to be a valid archive'}]
ZipErrorList = [{'level': 'error', 'substr': 'command not found'}, {'level': 'warning', 'substr': 'zip warning:'}, {'level': 'error', 'substr': 'zip error:'}, {'level': 'error', 'substr': 'Cannot open file: it does not appear to be a valid archive'}]
ZipalignErrorList = [{'level': 'error', 'substr': 'command not found'}, {'level': 'error', 'regex': <_sre.SRE_Pattern object at 0x829fe18>}, {'level': 'error', 'regex': <_sre.SRE_Pattern object at 0x826b0e8>}, {'level': 'error', 'substr': "Input and output can't be the same file"}]