Skip to content

Commit

Permalink
Change all keygen code to use 2048 bit key instead of 1024
Browse files Browse the repository at this point in the history
  • Loading branch information
hussamnasir committed Aug 17, 2018
1 parent 274f644 commit 07044df
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/geni-init-ca
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def init_ca(config, options):
cmd = ['/usr/bin/openssl', 'req', '-x509', '-nodes',
'-days', '1825',
'-subj', '/CN=%s' % (config.authority),
'-newkey', 'rsa:1024',
'-newkey', 'rsa:2048',
'-keyout', config.key,
'-out', config.cert,
'-config', ca_conf,
Expand Down
2 changes: 1 addition & 1 deletion bin/geni-init-services
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def init_ca(config, options):
cmd = ['/usr/bin/openssl', 'req', '-x509', '-nodes',
'-days', '1825',
'-subj', '/CN=%s' % (config.authority),
'-newkey', 'rsa:1024',
'-newkey', 'rsa:2048',
'-keyout', config.key,
'-out', config.cert,
'-config', ca_conf,
Expand Down
2 changes: 1 addition & 1 deletion bin/init-ca
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EOF

# Create the root certificate
/usr/bin/openssl req -x509 -nodes -days 365 -subj "/CN=${FQDN}" \
-newkey rsa:1024 -keyout "${CAKEY}" -out "${CACERT}" \
-newkey rsa:2048 -keyout "${CAKEY}" -out "${CACERT}" \
-config "${EXT_FILE}" -extensions "${EXT_NAME}"

/bin/rm "${EXT_FILE}"
2 changes: 1 addition & 1 deletion bin/mk-auth-req
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OPENSSL=/usr/bin/openssl
UUID=`/usr/bin/uuidgen -t`
SUBJECT="/O=${SHORT_HOST}/OU=authority/OU=${AUTHORITY}/CN=${UUID}/emailAddress=${EMAIL}"

"${OPENSSL}" req -new -newkey rsa:1024 -nodes \
"${OPENSSL}" req -new -newkey rsa:2048 -nodes \
-subj "${SUBJECT}" \
-keyout "${KEYFILE}" \
-out "${REQFILE}"
Expand Down
2 changes: 1 addition & 1 deletion templates/openssl.cnf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ emailAddress = optional

####################################################################
[ req ]
default_bits = 1024
default_bits = 2048
default_keyfile = privkey.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
Expand Down
2 changes: 1 addition & 1 deletion tools/cert_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def make_csr():
(key_fd, key_file) = tempfile.mkstemp()
os.close(key_fd)
csr_request_args = ['/usr/bin/openssl', 'req', '-new', \
'-newkey', 'rsa:1024', \
'-newkey', 'rsa:2048', \
'-nodes', \
'-keyout', key_file, \
'-out', csr_file, '-batch']
Expand Down

0 comments on commit 07044df

Please sign in to comment.