Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 485ea5b

Browse files
authored
Set x509 version in DTLS (#599)
1 parent 6caccce commit 485ea5b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 6118c5ab05e5c11cefcadaa1264f791dfafdd2f4 Mon Sep 17 00:00:00 2001
2+
From: Chen Li1 <[email protected]>
3+
Date: Wed, 5 Aug 2020 16:33:27 +0800
4+
Subject: [PATCH] Set x509 version
5+
6+
---
7+
erizo/src/erizo/dtls/DtlsClient.cpp | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/erizo/src/erizo/dtls/DtlsClient.cpp b/erizo/src/erizo/dtls/DtlsClient.cpp
11+
index bdad722..e77bdd1 100644
12+
--- a/erizo/src/erizo/dtls/DtlsClient.cpp
13+
+++ b/erizo/src/erizo/dtls/DtlsClient.cpp
14+
@@ -210,7 +210,7 @@ int createCert(const std::string& pAor, int expireDays, int keyLen, X509*& outCe
15+
X509_EXTENSION* ext = X509_EXTENSION_new();
16+
17+
// set version to X509v3 (starts from 0)
18+
- // X509_set_version(cert, 0L);
19+
+ X509_set_version(cert, 2L);
20+
std::string thread_id = boost::lexical_cast<std::string>(boost::this_thread::get_id());
21+
unsigned int thread_number = 0;
22+
sscanf(thread_id.c_str(), "%x", &thread_number);
23+
--
24+
2.7.4
25+

0 commit comments

Comments
 (0)