Changeset fc17435


Ignore:
Timestamp:
Jul 13, 2011 6:48:51 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
94a4267
Parents:
771a277
Message:

Add nokey

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/cert_to_fedid.py

    r771a277 rfc17435  
    2121        self.add_option('--cert', dest='cert',
    2222                help='Cretificate to copy subject from')
     23        self.add_option('--nokey', dest='include_key',
     24                action='store_false', default=True,
     25                help='Do not include the key in the generated ID')
    2326        self.add_option('--cn', dest='cn', default=None,
    2427                help='Set the CN directly')
     
    6871            try:
    6972                of = os.fdopen(os.open(opts.out,
    70                     os.O_WRONLY | os.O_CREAT, 0600), 'w')
    71                 for inf in (tn, key):
     73                    os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0600), 'w')
     74                if opts.include_key: sources = (tn, key)
     75                else:sources = (tn,)
     76
     77                for inf in sources:
    7278                    f = open(inf, 'r')
    7379                    for line in f:
Note: See TracChangeset for help on using the changeset viewer.