Index: wp-admin/setup-config.php
===================================================================
--- wp-admin/setup-config.php	(revision 10187)
+++ wp-admin/setup-config.php	(working copy)
@@ -29,6 +29,9 @@
 require_once('../wp-includes/compat.php');
 require_once('../wp-includes/functions.php');
 require_once('../wp-includes/classes.php');
+require_once('../wp-includes/http.php');
+require_once('../wp-includes/plugin.php');
+require_once('../wp-includes/l10n.php');
 
 if (!file_exists('../wp-config-sample.php'))
 	wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
@@ -155,6 +158,10 @@
 	if ( !empty($wpdb->error) )
 		wp_die($wpdb->error->get_error_message());
 
+	$response = wp_remote_get('https://api.wordpress.org/secret-key/1.1/');
+	if ( !is_wp_error($response) )
+		list($auth, $secure_auth, $logged_in, $nonce) = preg_split('/\n/',$response['body']);
+
 	$handle = fopen('../wp-config.php', 'w');
 
 	foreach ($configFile as $line_num => $line) {
@@ -171,6 +178,18 @@
 			case "define('DB_HOST'":
 				fwrite($handle, str_replace("localhost", $dbhost, $line));
 				break;
+			case "define('AUTH_KEY":
+				is_wp_error($response) ? fwrite($handle, $line) : fwrite($handle, "$auth\r\n");
+				break;
+			case "define('SECURE_A":
+				is_wp_error($response) ? fwrite($handle, $line) : fwrite($handle, "$secure_auth\r\n");
+				break;
+			case "define('LOGGED_I":
+				is_wp_error($response) ? fwrite($handle, $line) : fwrite($handle, "$logged_in\r\n");
+				break;
+			case "define('NONCE_KE":
+				is_wp_error($response) ? fwrite($handle, $line) : fwrite($handle, "$nonce\r\n");
+				break;
 			case '$table_prefix  =':
 				fwrite($handle, str_replace('wp_', $prefix, $line));
 				break;
@@ -182,10 +201,16 @@
 	chmod('../wp-config.php', 0666);
 
 	display_header();
+
+if ( is_wp_error($response) ) : 
 ?>
+<p>Unique authentication keys were unable to be configured.  For added security please configure the 'Authentication Unique Keys' section  manually in your <code>wp-config.php</code> file after the install has finished.</p>
+<?php endif; ?>
+
 <p>All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;</p>
 
 <p class="step"><a href="install.php" class="button">Run the install</a></p>
+
 <?php
 	break;
 }
