修订版 | 08422d74f47a3399a29ee18c6de71324ad24fdbd (tree) |
---|---|
时间 | 2018-02-22 18:30:51 |
作者 | Raphaël Hertzog <hertzog@debi...> |
Commiter | Raphaël Hertzog |
Add patch to build against openssl 1.1. Closes: #828557 Thanks to Hilko Bengen <bengen@debian.org> for the patch.
@@ -1,3 +1,10 @@ | ||
1 | +sslsniff (0.8-7) UNRELEASED; urgency=medium | |
2 | + | |
3 | + * Add patch to build against openssl 1.1. Closes: #828557 | |
4 | + Thanks to Hilko Bengen <bengen@debian.org> for the patch. | |
5 | + | |
6 | + -- Raphaël Hertzog <hertzog@debian.org> Thu, 22 Feb 2018 10:29:48 +0100 | |
7 | + | |
1 | 8 | sslsniff (0.8-6) unstable; urgency=medium |
2 | 9 | |
3 | 10 | * Add missing Vcs-Git and Vcs-Browser fields. |
@@ -0,0 +1,81 @@ | ||
1 | +Index: sslsniff/SessionCache.cpp | |
2 | +=================================================================== | |
3 | +--- sslsniff.orig/SessionCache.cpp | |
4 | ++++ sslsniff/SessionCache.cpp | |
5 | +@@ -47,7 +47,9 @@ void SessionCache::removeSessionId(unsig | |
6 | + } | |
7 | + | |
8 | + int SessionCache::setNewSessionId(SSL *s, SSL_SESSION *session) { | |
9 | +- return setNewSessionId(s, session, session->session_id, session->session_id_length); | |
10 | ++ unsigned int id_length; | |
11 | ++ const unsigned char *id = SSL_SESSION_get_id(session, &id_length); | |
12 | ++ return setNewSessionId(s, session, (unsigned char*)id, id_length); | |
13 | + } | |
14 | + | |
15 | + int SessionCache::setNewSessionId(SSL *s, SSL_SESSION *session, | |
16 | +@@ -94,7 +96,7 @@ int SessionCache::setNewSessionId(SSL *s | |
17 | + return 1; | |
18 | + } | |
19 | + | |
20 | +-SSL_SESSION * SessionCache::getSessionId(SSL *s, unsigned char *id, int idLength, int *ref) { | |
21 | ++SSL_SESSION * SessionCache::getSessionId(SSL *s, const unsigned char *id, int idLength, int *ref) { | |
22 | + int i; | |
23 | + unsigned char *b; | |
24 | + | |
25 | +@@ -117,7 +119,7 @@ SSL_SESSION * SessionCache::getSessionId | |
26 | + | |
27 | + // Trampoline Functions. Yay C. | |
28 | + | |
29 | +-SSL_SESSION * SessionCache::getSessionIdTramp(SSL *s, unsigned char *id, int idLength, int *ref) { | |
30 | ++SSL_SESSION * SessionCache::getSessionIdTramp(SSL *s, const unsigned char *id, int idLength, int *ref) { | |
31 | + return SessionCache::getInstance()->getSessionId(s, id, idLength, ref); | |
32 | + } | |
33 | + | |
34 | +Index: sslsniff/certificate/Certificate.hpp | |
35 | +=================================================================== | |
36 | +--- sslsniff.orig/certificate/Certificate.hpp | |
37 | ++++ sslsniff/certificate/Certificate.hpp | |
38 | +@@ -92,7 +92,8 @@ private: | |
39 | + } | |
40 | + | |
41 | + void parseCommonName(X509 *cert) { | |
42 | +- std::string distinguishedName(cert->name); | |
43 | ++ char buf[4096]; | |
44 | ++ std::string distinguishedName(X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf))); | |
45 | + std::string::size_type cnIndex = distinguishedName.find("CN="); | |
46 | + | |
47 | + if (cnIndex == std::string::npos) throw BadCertificateException(); | |
48 | +Index: sslsniff/certificate/TargetedCertificateManager.cpp | |
49 | +=================================================================== | |
50 | +--- sslsniff.orig/certificate/TargetedCertificateManager.cpp | |
51 | ++++ sslsniff/certificate/TargetedCertificateManager.cpp | |
52 | +@@ -115,8 +115,9 @@ void TargetedCertificateManager::getCert | |
53 | + | |
54 | + void TargetedCertificateManager::dump() { | |
55 | + std::list<Certificate*>::iterator i; | |
56 | ++ char buf[4096]; | |
57 | + | |
58 | + for(i=certificates.begin(); i != certificates.end(); ++i) | |
59 | +- std::cout << "Certificate: " << (*i)->getCert()->name << std::endl; | |
60 | ++ std::cout << "Certificate: " << X509_NAME_oneline(X509_get_subject_name((*i)->getCert()), buf, sizeof(buf)) << std::endl; | |
61 | + | |
62 | + } | |
63 | +Index: sslsniff/SessionCache.hpp | |
64 | +=================================================================== | |
65 | +--- sslsniff.orig/SessionCache.hpp | |
66 | ++++ sslsniff/SessionCache.hpp | |
67 | +@@ -49,12 +49,12 @@ class SessionCache { | |
68 | + | |
69 | + public: | |
70 | + static SessionCache* getInstance(); | |
71 | +- static SSL_SESSION * getSessionIdTramp(SSL *s, unsigned char *id, int idLength, int *ref); | |
72 | ++ static SSL_SESSION * getSessionIdTramp(SSL *s, const unsigned char *id, int idLength, int *ref); | |
73 | + static int setNewSessionIdTramp(SSL *s, SSL_SESSION *session); | |
74 | + | |
75 | + int setNewSessionId(SSL *s, SSL_SESSION *session); | |
76 | + int setNewSessionId(SSL *s, SSL_SESSION *session, unsigned char *id, int idLength); | |
77 | +- SSL_SESSION * getSessionId(SSL *s, unsigned char *id, int idLength, int *ref); | |
78 | ++ SSL_SESSION * getSessionId(SSL *s, const unsigned char *id, int idLength, int *ref); | |
79 | + | |
80 | + private: | |
81 | + static SessionCache *sessionCache; |
@@ -1,3 +1,4 @@ | ||
1 | 1 | 01-fix-compatibility-with-boost-1.48.patch |
2 | 2 | 02-fix-compatibility-with-gcc49.patch |
3 | 3 | Add-missing-libraries-at-link-time.patch |
4 | +Fix-OpenSSL-1.1-FTBFS.patch |