Changeset 275:5ac8383e5fec in mediastreamer2
- Timestamp:
- Feb 27, 2009 2:05:14 PM (4 years ago)
- Branch:
- default
- Location:
- linphone/oRTP
- Files:
-
- 2 edited
-
include/ortp/stun.h (modified) (1 diff)
-
src/stun.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linphone/oRTP/include/ortp/stun.h
r227 r275 428 428 } StunServerInfo; 429 429 430 void 431 stunCalculateIntegrity_longterm(char* hmac, const char* input, int length, 432 const char *username, const char *realm, const char *password); 433 void 434 stunCalculateIntegrity_shortterm(char* hmac, const char* input, int length, const char* key); 435 430 436 bool_t 431 437 stunParseMessage( char* buf, -
linphone/oRTP/src/stun.c
r274 r275 124 124 } 125 125 126 static void127 computeHmac_longterm(char* hmac, const char* input, int length,128 const char *username, const char *realm, const char *password);129 static void130 computeHmac_shortterm(char* hmac, const char* input, int length, const char* key);131 132 126 static bool_t 133 127 stunParseAtrAddress( char* body, unsigned int hdrLen, StunAtrAddress4 *result ) … … 1045 1039 1046 1040 encode16(lengthp, (UInt16)(ptr - buf - sizeof(StunMsgHdr)+24)); 1047 computeHmac_longterm(integrity.hash, buf, (int)(ptr-buf) ,1041 stunCalculateIntegrity_longterm(integrity.hash, buf, (int)(ptr-buf) , 1048 1042 msg->username.value, msg->realmName.value, password->value); 1049 1043 ptr = encodeAtrIntegrity(ptr, &integrity); … … 1057 1051 1058 1052 encode16(lengthp, (UInt16)(ptr - buf - sizeof(StunMsgHdr)+24)); 1059 computeHmac_shortterm(integrity.hash, buf, (int)(ptr-buf) ,1053 stunCalculateIntegrity_shortterm(integrity.hash, buf, (int)(ptr-buf) , 1060 1054 password->value); 1061 1055 ptr = encodeAtrIntegrity(ptr, &integrity); … … 1178 1172 1179 1173 #ifdef NOSSL 1180 staticvoid1181 computeHmac_longterm(char* hmac, const char* input, int length,1174 void 1175 stunCalculateIntegrity_longterm(char* hmac, const char* input, int length, 1182 1176 const char *username, const char *realm, const char *password) 1183 1177 { 1184 1178 strncpy(hmac,"hmac-not-implemented",20); 1185 1179 } 1186 staticvoid1187 computeHmac_shortterm(char* hmac, const char* input, int length, const char* key)1180 void 1181 stunCalculateIntegrity_shortterm(char* hmac, const char* input, int length, const char* key) 1188 1182 { 1189 1183 strncpy(hmac,"hmac-not-implemented",20); … … 1193 1187 #include <openssl/md5.h> 1194 1188 1195 staticvoid1196 computeHmac_longterm(char* hmac, const char* input, int length,1189 void 1190 stunCalculateIntegrity_longterm(char* hmac, const char* input, int length, 1197 1191 const char *username, const char *realm, const char *password) 1198 1192 { … … 1210 1204 } 1211 1205 1212 staticvoid1213 computeHmac_shortterm(char* hmac, const char* input, int length, const char* key)1206 void 1207 stunCalculateIntegrity_shortterm(char* hmac, const char* input, int length, const char* key) 1214 1208 { 1215 1209 unsigned int resultSize=0;
Note: See TracChangeset
for help on using the changeset viewer.
