Merge with wpa_supplicant 1.0 stable release
[profile/ivi/wpa_supplicant.git] / src / crypto / dh_groups.c
index 7bd2fb7..e5b7d4c 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "common.h"
 #include "crypto.h"
+#include "random.h"
 #include "dh_groups.h"
 
 
@@ -564,7 +565,8 @@ struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv)
        if (*priv == NULL)
                return NULL;
 
-       if (os_get_random(wpabuf_put(*priv, dh->prime_len), dh->prime_len)) {
+       if (random_get_bytes(wpabuf_put(*priv, dh->prime_len), dh->prime_len))
+       {
                wpabuf_free(*priv);
                *priv = NULL;
                return NULL;