*/
RCSID("$Id$")
-#define LOG_PREFIX "eap - gtc"
-
#include <freeradius-devel/eap/base.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/server/virtual_servers.h>
*/
RCSID("$Id$")
-#define LOG_PREFIX "eap - md5"
-
#include <stdio.h>
#include <stdlib.h>
#include <freeradius-devel/eap/base.h>
/*
* We expect only RESPONSE for which SUCCESS or FAILURE is sent back
*/
-MD5_PACKET *eap_md5_extract(eap_round_t *eap_round)
+MD5_PACKET *eap_md5_extract(request_t *request, eap_round_t *eap_round)
{
md5_packet_t *data;
MD5_PACKET *packet;
!eap_round->response->type.data ||
(eap_round->response->length <= MD5_HEADER_LEN) ||
(eap_round->response->type.data[0] == 0)) {
- ERROR("corrupted data");
+ REDEBUG("corrupted data");
return NULL;
}
/*
* verify = MD5(id+password+challenge_sent)
*/
-int eap_md5_verify(MD5_PACKET *packet, fr_pair_t* password,
+int eap_md5_verify(request_t *request, MD5_PACKET *packet, fr_pair_t* password,
uint8_t *challenge)
{
char *ptr;
* Sanity check it.
*/
if (packet->value_size != 16) {
- ERROR("Expected 16 bytes of response to challenge, got %d", packet->value_size);
+ REDEBUG("Expected 16 bytes of response to challenge, got %d", packet->value_size);
return 0;
}
/* function declarations here */
int eap_md5_compose(eap_round_t *auth, MD5_PACKET *reply);
-MD5_PACKET *eap_md5_extract(eap_round_t *auth);
-int eap_md5_verify(MD5_PACKET *pkt, fr_pair_t* pwd, uint8_t *ch);
+MD5_PACKET *eap_md5_extract(request_t *request, eap_round_t *auth);
+int eap_md5_verify(request_t *request, MD5_PACKET *pkt, fr_pair_t* pwd, uint8_t *ch);
/*
* Extract the EAP-MD5 packet.
*/
- packet = eap_md5_extract(eap_session->this_round);
+ packet = eap_md5_extract(request, eap_session->this_round);
if (!packet) {
if (ephemeral) TALLOC_FREE(known_good);
RETURN_MODULE_INVALID;
* Verify the received packet against the previous packet
* (i.e. challenge) which we sent out.
*/
- if (eap_md5_verify(packet, known_good, eap_session->opaque)) {
+ if (eap_md5_verify(request, packet, known_good, eap_session->opaque)) {
reply->code = FR_MD5_SUCCESS;
} else {
reply->code = FR_MD5_FAILURE;
*/
RCSID("$Id$")
-#define LOG_PREFIX "eap - peap"
-
#include <freeradius-devel/eap/tls.h>
#include "eap_peap.h"
*/
inst->tls_conf = eap_tls_conf_parse(cs, "tls");
if (!inst->tls_conf) {
- ERROR("Failed initializing SSL context");
+ cf_log_err(cs, "Failed initializing SSL context");
return -1;
}
RCSID("$Id$")
USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */
-#define LOG_PREFIX "eap - pwd"
-
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/tls/base.h>
inst->bnctx = BN_CTX_new();
if (!inst->bnctx) {
- ERROR("Failed to get BN context");
+ cf_log_err(cs, "Failed to get BN context");
return -1;
}
RCSID("$Id$")
USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */
-#define LOG_PREFIX "eap - tls"
-
#ifdef HAVE_OPENSSL_RAND_H
# include <openssl/rand.h>
#endif
inst->tls_conf = eap_tls_conf_parse(cs, "tls");
if (!inst->tls_conf) {
- ERROR("Failed initializing SSL context");
+ cf_log_err(cs, "Failed initializing SSL context");
return -1;
}
RCSID("$Id$")
USES_APPLE_DEPRECATED_API /* OpenSSL API has been deprecated by Apple */
-#define LOG_PREFIX "eap - ttls"
-
#include <freeradius-devel/eap/tls.h>
#include "eap_ttls.h"
*/
inst->tls_conf = eap_tls_conf_parse(cs, "tls");
if (!inst->tls_conf) {
- ERROR("Failed initializing SSL context");
+ cf_log_err(cs, "Failed initializing SSL context");
return -1;
}