Merge with wpa_supplicant 1.0 stable release
[profile/ivi/wpa_supplicant.git] / src / eap_peer / ikev2.c
index 309a331..acd7611 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "common.h"
 #include "crypto/dh_groups.h"
+#include "crypto/random.h"
 #include "ikev2.h"
 
 
@@ -424,7 +425,7 @@ static int ikev2_process_kei(struct ikev2_responder_data *data,
        }
 
        /* RFC 4306, Section 3.4:
-        * The length of DH public value MUST be equal to the lenght of the
+        * The length of DH public value MUST be equal to the length of the
         * prime modulus.
         */
        if (kei_len - 4 != data->dh->prime_len) {
@@ -1133,7 +1134,7 @@ static struct wpabuf * ikev2_build_sa_init(struct ikev2_responder_data *data)
                    data->r_spi, IKEV2_SPI_LEN);
 
        data->r_nonce_len = IKEV2_NONCE_MIN_LEN;
-       if (os_get_random(data->r_nonce, data->r_nonce_len))
+       if (random_get_bytes(data->r_nonce, data->r_nonce_len))
                return NULL;
 #ifdef CCNS_PL
        /* Zeros are removed incorrectly from the beginning of the nonces in