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

Unified Diff: third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h

Issue 21968004: Updated usrsctp to fix various issues for windows (using changes pushed upstream) and unified SHA1 … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed indent Created 7 years, 4 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
Index: third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h
diff --git a/third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h b/third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h
index 4000e41d78fe237b7cffa0053c27bd945e5ba7e2..006e9209006e12be499c44368cefcb2811fb7e62 100644
--- a/third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h
+++ b/third_party/usrsctp/overrides/usrsctplib/netinet/sctp_sha1.h
@@ -40,11 +40,30 @@ __FBSDID("$FreeBSD$");
#define __SCTP_SHA1_h__
#include <sys/types.h>
-#ifdef SCTP_USE_NSS_SHA1
+
+#if !defined(SSL_USE_OPENSSL) && !defined(SSL_USE_NSS)
+#if defined(WIN32)
+
+#define SCTP_USE_SCTP_SHA1 1
+
+#else // defined(WIN32)
+
+#if defined(HAVE_OPENSSL_SSL_H)
+#define SSL_USE_OPENSSL 1
+#elif defined(HAVE_NSS_SSL_H)
+#define SSL_USE_NSS 1
+#else
+#define SCTP_USE_SCTP_SHA1
+#endif
+
+#endif // !defined(WIN32)
+#endif
+
+#if defined(SSL_USE_NSS)
#include <netinet/sctp_nss_sha1.h>
-#elif SCTP_USE_OPENSSL_SHA1
+#elif defined(SSL_USE_OPENSSL)
#include <netinet/sctp_openssl_sha1.h>
-#else // USE_SCTP_SHA1
+#else // SCTP_USE_SCTP_SHA1
struct sha1_context {
unsigned int A;
unsigned int B;
@@ -99,5 +118,5 @@ void SHA1_Update(struct sha1_context *, const unsigned char *, int);
void SHA1_Final(unsigned char *, struct sha1_context *);
#endif /* _KERNEL */
-#endif
-#endif
+#endif /* !defined(SSL_USE_OPENSSL) && !defined(SSL_USE_NSS) */
+#endif /* __SCTP_SHA1_h__ */
« no previous file with comments | « third_party/usrsctp/overrides/usrsctplib/netinet/sctp_os_userspace.h ('k') | third_party/usrsctp/usrsctp.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698