Exemplo n.º 1
0
def main():
    """ main routine
        10  CA certificate not found
        11  DB initialization failure
        12  no Organization ID. Something very bad is going on.
        13  Couldn't insert the certificate for whatever reason.
    """

    values = processCommandline()

    def writeError(e):
        sys.stderr.write('\nERROR: %s\n' % e)

    try:
        satCerts.store_rhnCryptoKey(values.label, values.ca_cert, verbosity=values.verbose)
    except satCerts.NoOrgIdError, e:
        writeError("no organization ID!?!\n\n%s\n" % rhnTB.fetchTraceback())
        sys.exit(12)
Exemplo n.º 2
0
def main():
    """ main routine
        10  CA certificate not found
        11  DB initialization failure
        13  Couldn't insert the certificate for whatever reason.
    """

    values = processCommandline()

    def writeError(e):
        sys.stderr.write('\nERROR: %s\n' % e)

    try:
        satCerts.store_rhnCryptoKey(values.label, values.ca_cert, verbosity=values.verbose)
    except satCerts.CaCertInsertionError:
        writeError("Cannot insert certificate into DB!\n\n%s\n" % rhnTB.fetchTraceback())
        sys.exit(13)
    return 0
Exemplo n.º 3
0
def main():
    """ main routine
        10  CA certificate not found
        11  DB initialization failure
        12  no Organization ID. Something very bad is going on.
        13  Couldn't insert the certificate for whatever reason.
    """

    values = processCommandline()

    def writeError(e):
        sys.stderr.write('\nERROR: %s\n' % e)

    try:
        satCerts.store_rhnCryptoKey(values.label,
                                    values.ca_cert,
                                    verbosity=values.verbose)
    except satCerts.NoOrgIdError, e:
        writeError("no organization ID!?!\n\n%s\n" % rhnTB.fetchTraceback())
        sys.exit(12)
Exemplo n.º 4
0
def main():
    """ main routine
        10  CA certificate not found
        11  DB initialization failure
        13  Couldn't insert the certificate for whatever reason.
    """

    values = processCommandline()

    def writeError(e):
        sys.stderr.write('\nERROR: %s\n' % e)

    try:
        satCerts.store_rhnCryptoKey(values.label,
                                    values.ca_cert,
                                    verbosity=values.verbose)
    except satCerts.CaCertInsertionError:
        writeError("Cannot insert certificate into DB!\n\n%s\n" %
                   rhnTB.fetchTraceback())
        sys.exit(13)
    return 0