Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: talk/session/media/srtpfilter_unittest.cc

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/session/media/srtpfilter.cc ('k') | webrtc/base/opensslstreamadapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 22 matching lines...) Expand all
33 #include "webrtc/base/gunit.h" 33 #include "webrtc/base/gunit.h"
34 #include "webrtc/base/thread.h" 34 #include "webrtc/base/thread.h"
35 extern "C" { 35 extern "C" {
36 #ifdef SRTP_RELATIVE_PATH 36 #ifdef SRTP_RELATIVE_PATH
37 #include "crypto/include/err.h" 37 #include "crypto/include/err.h"
38 #else 38 #else
39 #include "third_party/libsrtp/srtp/crypto/include/err.h" 39 #include "third_party/libsrtp/srtp/crypto/include/err.h"
40 #endif 40 #endif
41 } 41 }
42 42
43 using cricket::CS_AES_CM_128_HMAC_SHA1_80; 43 using rtc::CS_AES_CM_128_HMAC_SHA1_80;
44 using cricket::CS_AES_CM_128_HMAC_SHA1_32; 44 using rtc::CS_AES_CM_128_HMAC_SHA1_32;
45 using cricket::CryptoParams; 45 using cricket::CryptoParams;
46 using cricket::CS_LOCAL; 46 using cricket::CS_LOCAL;
47 using cricket::CS_REMOTE; 47 using cricket::CS_REMOTE;
48 48
49 static const uint8 kTestKey1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234"; 49 static const uint8 kTestKey1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234";
50 static const uint8 kTestKey2[] = "4321ZYXWVUTSRQPONMLKJIHGFEDCBA"; 50 static const uint8 kTestKey2[] = "4321ZYXWVUTSRQPONMLKJIHGFEDCBA";
51 static const int kTestKeyLen = 30; 51 static const int kTestKeyLen = 30;
52 static const std::string kTestKeyParams1 = 52 static const std::string kTestKeyParams1 =
53 "inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz"; 53 "inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz";
54 static const std::string kTestKeyParams2 = 54 static const std::string kTestKeyParams2 =
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); 926 srtp_stat_.AddUnprotectRtcpResult(err_status_fail);
927 EXPECT_EQ(-1, mode_); 927 EXPECT_EQ(-1, mode_);
928 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_); 928 EXPECT_EQ(cricket::SrtpFilter::ERROR_NONE, error_);
929 // Now the error will be triggered again. 929 // Now the error will be triggered again.
930 Reset(); 930 Reset();
931 rtc::Thread::Current()->SleepMs(210); 931 rtc::Thread::Current()->SleepMs(210);
932 srtp_stat_.AddUnprotectRtcpResult(err_status_fail); 932 srtp_stat_.AddUnprotectRtcpResult(err_status_fail);
933 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_); 933 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, mode_);
934 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_); 934 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_);
935 } 935 }
OLDNEW
« no previous file with comments | « talk/session/media/srtpfilter.cc ('k') | webrtc/base/opensslstreamadapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698