FreeBSD Bugzilla – Attachment 187819 Details for
Bug 223486
www/e2guardian: Fix certificate verification with SSL_MITM option enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for file patch-src_CertificateAuthority.cpp
patch-src_CertificateAuthority.cpp (text/plain), 1.31 KB, created by
Bekzod Alimov
on 2017-11-07 06:28:15 UTC
(
hide
)
Description:
Patch for file patch-src_CertificateAuthority.cpp
Filename:
MIME Type:
Creator:
Bekzod Alimov
Created:
2017-11-07 06:28:15 UTC
Size:
1.31 KB
patch
obsolete
>--- src/CertificateAuthority.cpp.orig 2017-11-07 11:03:31.029355000 +0500 >+++ src/CertificateAuthority.cpp 2017-06-21 00:18:18.000000000 +0500 >@@ -118,7 +118,7 @@ > // added to generate different serial number than previous versions > // needs to be added as an option > std::string sname(commonname ); >- sname += "A"; >+ sname += "B"; > > #ifdef DGDEBUG > std::cout << "Generating serial no for " << commonname << std::endl; >@@ -390,6 +390,14 @@ > return NULL; > } > >+{ >+ String temp1 = "DNS:"; >+ String temp2 = commonname; >+ temp1 = temp1 + temp2; >+ char *value = (char*) temp1.toCharArray(); >+if( !addExtension(newCert, NID_subject_alt_name, value)) >+ log_ssl_errors("Error adding subjectAltName to the request", commonname); >+} > //sign it using the ca > ERR_clear_error(); > if (!X509_sign(newCert, _caPrivKey, EVP_sha256())) { >@@ -521,4 +529,18 @@ > if (_caPrivKey) EVP_PKEY_free(_caPrivKey); > if (_certPrivKey) EVP_PKEY_free(_certPrivKey); > } >+ >+bool CertificateAuthority::addExtension(X509 *cert, int nid, char *value) >+{ >+ X509_EXTENSION *ex = NULL; >+ >+ ex = X509V3_EXT_conf_nid(NULL,NULL , nid, value); >+ >+ int result = X509_add_ext(cert, ex, -1); >+ >+ X509_EXTENSION_free(ex); >+ >+ return (result > 0) ? true : false; >+} >+ > #endif //__SSLMITM
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
marcellocoutinho:
maintainer-approval-
Actions:
View
|
Diff
Attachments on
bug 223486
:
187816
|
187818
| 187819 |
192565