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

Unified Diff: webrtc/base/opensslidentity.cc

Issue 1844313002: Rename some things SSL for style guide adherence (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/opensslidentity.h ('k') | webrtc/base/sslidentity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/opensslidentity.cc
diff --git a/webrtc/base/opensslidentity.cc b/webrtc/base/opensslidentity.cc
index 24b97b136e84a5f80d908fd14c6f8111d58cfa99..9c2112e157c0dc71099b57a764c58c4e48d4c28b 100644
--- a/webrtc/base/opensslidentity.cc
+++ b/webrtc/base/opensslidentity.cc
@@ -407,16 +407,18 @@ OpenSSLIdentity* OpenSSLIdentity::GenerateInternal(
return NULL;
}
-OpenSSLIdentity* OpenSSLIdentity::Generate(const std::string& common_name,
- const KeyParams& key_params,
- time_t certificate_lifetime) {
+OpenSSLIdentity* OpenSSLIdentity::GenerateWithExpiration(
+ const std::string& common_name,
+ const KeyParams& key_params,
+ time_t certificate_lifetime) {
SSLIdentityParams params;
params.key_params = key_params;
params.common_name = common_name;
time_t now = time(NULL);
- params.not_before = now + kCertificateWindow;
+ params.not_before = now + kCertificateWindowInSeconds;
params.not_after = now + certificate_lifetime;
- RTC_DCHECK(params.not_before < params.not_after);
+ if (params.not_before > params.not_after)
+ return nullptr;
perkj_webrtc 2016/03/31 13:01:41 RTC_CHECK(... ) ?
torbjorng (webrtc) 2016/03/31 13:58:18 I removed the RTC_CHECK here since it would not be
return GenerateInternal(params);
}
« no previous file with comments | « webrtc/base/opensslidentity.h ('k') | webrtc/base/sslidentity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698