#include "eap_simaka_pseudonym_provider.h"
+#include <debug.h>
#include <utils/hashtable.h>
typedef struct private_eap_simaka_pseudonym_provider_t private_eap_simaka_pseudonym_provider_t;
{
char buf[8], hex[sizeof(buf) * 2 + 1];
- this->rng->get_bytes(this->rng, sizeof(buf), buf);
+ if (!this->rng->get_bytes(this->rng, sizeof(buf), buf))
+ {
+ return NULL;
+ }
chunk_to_hex(chunk_create(buf, sizeof(buf)), hex, FALSE);
return identification_create_from_string(hex);
}
pseudonym = gen_identity(this);
+ if (!pseudonym)
+ {
+ DBG1(DBG_CFG, "failed to generate pseudonym");
+ return NULL;
+ }
/* create new entries */
id = id->clone(id);