working on oauth

This commit is contained in:
mom040267 2014-09-25 02:12:40 +00:00
parent 21054d7af4
commit 664be4d8e6
5 changed files with 19 additions and 24 deletions

View File

@ -1,5 +1,6 @@
08/22/2014 Oleg Moskalenko <mom040267@gmail.com>
Version 4.1.2.2 'Vitari':
Version 4.1.3.2 'Vitari':
- oAuth security implementation. (TODO)
- redis user key operation fixed.
- redis, mysql and psql db operations fixed.
- SHA-256 memory leak fixed.
@ -8,8 +9,7 @@ Version 4.1.2.2 'Vitari':
- Move secondary download area to coturn.net.
- TLS renegotiation DoS attack prevention implemented;
- FQDN as relay-ip and listener-ip parameters (issue 6)
(patch provided by Iñaki Baz Castillo);
- oAuth security implementation. (TODO)
(patch provided by Iñaki Baz Castillo);
08/14/2014 Oleg Moskalenko <mom040267@gmail.com>
Version 4.1.2.1 'Vitari':

View File

@ -2,7 +2,7 @@
# Common settings script.
TURNVERSION=4.1.2.2
TURNVERSION=4.1.3.2
BUILDDIR=~/rpmbuild
ARCH=`uname -p`
TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn

View File

@ -1,5 +1,5 @@
Name: turnserver
Version: 4.1.2.2
Version: 4.1.3.2
Release: 0%{dist}
Summary: Coturn TURN Server
@ -294,8 +294,8 @@ fi
%{_includedir}/turn/client/TurnMsgLib.h
%changelog
* Thu Aug 22 2014 Oleg Moskalenko <mom040267@gmail.com>
- Sync to 4.1.2.2
* Wed Sep 24 2014 Oleg Moskalenko <mom040267@gmail.com>
- Sync to 4.1.3.2
* Thu Aug 14 2014 Oleg Moskalenko <mom040267@gmail.com>
- Sync to 4.1.2.1
* Tue Jul 29 2014 Oleg Moskalenko <mom040267@gmail.com>

View File

@ -31,7 +31,7 @@
#ifndef __IOADEFS__
#define __IOADEFS__
#define TURN_SERVER_VERSION "4.1.2.2"
#define TURN_SERVER_VERSION "4.1.3.2"
#define TURN_SERVER_VERSION_NAME "Vitari"
#define TURN_SOFTWARE "Coturn-" TURN_SERVER_VERSION " '" TURN_SERVER_VERSION_NAME "'"

View File

@ -3308,29 +3308,24 @@ static int check_stun_auth(turn_turnserver *server,
/* Password */
if(!(ss->hmackey_set) && (ss->pwd[0] == 0)) {
ur_string_map_value_type ukey = NULL;
if(can_resume) {
ukey = (server->userkeycb)(server->id, server->ct, usname, realm, resume_processing_after_username_check, in_buffer, ss->id, postpone_reply);
(server->userkeycb)(server->id, server->ct, usname, realm, resume_processing_after_username_check, in_buffer, ss->id, postpone_reply);
if(*postpone_reply) {
return 0;
}
}
/* we always return NULL for short-term credentials here */
if(!ukey) {
/* direct user pattern is supported only for long-term credentials */
TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR,
"%s: Cannot find credentials of user <%s>\n",
__FUNCTION__, (char*)usname);
*err_code = 401;
*reason = (const u08bits*)"Unauthorised";
if(server->ct != TURN_CREDENTIALS_SHORT_TERM) {
return create_challenge_response(ss,tid,resp_constructed,err_code,reason,nbh,method);
} else {
return -1;
}
/* direct user pattern is supported only for long-term credentials */
TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR,
"%s: Cannot find credentials of user <%s>\n",
__FUNCTION__, (char*)usname);
*err_code = 401;
*reason = (const u08bits*)"Unauthorised";
if(server->ct != TURN_CREDENTIALS_SHORT_TERM) {
return create_challenge_response(ss,tid,resp_constructed,err_code,reason,nbh,method);
} else {
return -1;
}
ns_bcopy(ukey,ss->hmackey,16);
ss->hmackey_set = 1;
}
/* Check integrity */