Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e329b62
implement minimum code to perform client-side tls handshake
kazuho Apr 19, 2016
40ff93d
it works! the socket client example now can speak tls
kazuho Apr 19, 2016
6724e1b
socket abstraction layer indicates error using `const char*`
kazuho Apr 19, 2016
39ff129
report the result of certificate verification
kazuho Apr 21, 2016
d33f269
support partial-archive dump
kazuho Apr 21, 2016
51039c5
extract https://github.com/curl/curl @ curl-7_48_0 (lib/mk-ca-bundle.…
kazuho Apr 21, 2016
6d75ad1
generate ca-bundle.crt under share/h2o
kazuho Apr 21, 2016
a83b0b3
install ca-bundle.crt
kazuho Apr 21, 2016
80a0744
load ca-bundle.crt
kazuho Apr 21, 2016
efc561e
use SNI
kazuho Apr 21, 2016
85e093f
extract https://github.com/iSECPartners/ssl-conservatory @ 1449f3a at…
kazuho Apr 19, 2016
006d97b
validate CN
kazuho Apr 21, 2016
546f3e6
extract https://github.com/kazuho/ssl-conservatory @ 55e9e6f () at de…
kazuho Apr 21, 2016
d08e9bc
do not expose `validate_hostname`
kazuho Apr 21, 2016
ca67689
extract https://github.com/kazuho/ssl-conservatory @ 0eb6cbd () at de…
kazuho Apr 21, 2016
8725771
add https support to http1client
kazuho Apr 22, 2016
2786374
update SSL bio when reusing socket from pool
kazuho Apr 22, 2016
1d6e7d0
fix compile error introduced in 8725771
kazuho Apr 23, 2016
eff1457
simplify, by moving `SSL_CTX*` to `h2o_http1client_ctx_t`
kazuho Apr 23, 2016
f02c7e3
for unix socket, use the path for SNI
kazuho Apr 25, 2016
96b80eb
report hostname mismatch only if SSL_VERIFY_PEER is set
kazuho Apr 25, 2016
056b84e
implement reverse proxying to HTTPS origin. peer verification config…
kazuho Apr 25, 2016
b29872e
add tests for reverse proxying over HTTPS
kazuho Apr 26, 2016
dc8166e
create custom HTTP client context if SSL_CTX is customized
kazuho Apr 26, 2016
c926042
add test for reproxy
kazuho Apr 26, 2016
73a83ef
remove tests expecting failure with https urls
kazuho Apr 27, 2016
72db9eb
default port must be 443 for fetching an external HTTPS resource
kazuho Apr 27, 2016
380e4d4
respect H2O_ROOT environment variable when loading the default ca bundle
kazuho Apr 28, 2016
288c420
simplify the SSL_CTX setup process
kazuho Apr 28, 2016
c893cac
use SSLv23_client_method (which is the general purpose method accordi…
kazuho Apr 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ IF (NOT WITHOUT_LIBS)
ENDIF ()

INSTALL(PROGRAMS share/h2o/annotate-backtrace-symbols share/h2o/fastcgi-cgi share/h2o/fetch-ocsp-response share/h2o/kill-on-close share/h2o/setuidgid share/h2o/start_server DESTINATION share/h2o)
INSTALL(FILES share/h2o/ca-bundle.crt DESTINATION share/h2o)
INSTALL(FILES share/h2o/status/index.html DESTINATION share/h2o/status)
INSTALL(DIRECTORY doc/ DESTINATION share/doc/h2o PATTERN "Makefile" EXCLUDE PATTERN "README.md" EXCLUDE)
INSTALL(DIRECTORY examples/ DESTINATION share/doc/h2o/examples)
Expand Down
5 changes: 5 additions & 0 deletions deps/ssl-conservatory/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These files are text and should be normalized (convert crlf => lf)
*.c text
*.h text
*.txt text
*.md text
34 changes: 34 additions & 0 deletions deps/ssl-conservatory/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so

# Compiled Static libraries
*.lai
*.la
*.a

# Windows binaries
*.exe

# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
19 changes: 19 additions & 0 deletions deps/ssl-conservatory/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) 2012, iSEC Partners.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions deps/ssl-conservatory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
The SSL Conservatory
====================

Correct implementation of SSL is crucial to secure transmission of data
between clients and servers. However, this crucial task is frequently done
improperly, due to complex APIs and lack of understanding of SSL fundamentals.

This is intended to be a clearinghouse for well-documented and secure sample
code to correctly implement SSL clients. Pull requests with examples for
other languages or frameworks are encouraged.


Content
-------

### openssl/

Whitepaper and sample code on how to perform certificate validation within an
SSL client using the OpenSSL library.

### ios/
SSL certificate pinning implementation for iOS applications.


License
-------

See LICENSE.
89 changes: 89 additions & 0 deletions deps/ssl-conservatory/ios/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
The SSL Conservatory: iOS Certificate Pinning
=============================================


When an iOS application only needs to communicate to a well-defined set of
servers over SSL or HTTPS, the security of the app's network communications can
be improved through SSL pinning. By requiring a specific certificate to be part
of the server's certificate chain, the threat of a rogue CA or a CA compromise
is significantly reduced.


### The ISPCertificatePinning class

#### Description

This class allows developers to whitelist a list of certificates for a given
domain in order to require at least one these "pinned" certificates to be part
of the server's certificate chain received when connecting to the domain over
SSL or HTTPS.

This gives developers the flexibility to pin the CA/anchor certificate, the
server/leaf certificate, or any intermediate certificate for a given domain.
Each option has different advantages and limitations; for example, pinning the
server/leaf certificate provides the best security but this certificate is going
to change more often than the CA/anchor certificate.

A change in the certificate presented by the server (for example because the
previous certificate expired) will result in the application being unable to
connect to the server until its pinned certificate has been updated as well.
To address this scenario, multiple certificates can be pinned to a single
domain. This gives developers the ability to transition from an expiring
certificate to a new one by releasing a new version of their application that
pins both certificates to the server's domain.


#### API

The ISPCertificatePinning class exposes two methods:

##### +(BOOL)setupSSLPinsUsingDictionnary:(NSDictionary*)domainsAndCertificates
This method takes a dictionary with domain names as keys and arrays of
DER-encoded certificates as values, and stores them in a pre-defined location on
the filesystem. The ability to specify multiple certificates for a single
domain is useful when transitioning from an expiring certificate to a new one

##### +(BOOL)verifyPinnedCertificateForTrust:(SecTrustRef)trust andDomain:(NSString*)domain
This method accesses the certificates previously loaded using the
setupSSLPinsUsingDictionnary: method and inspects the trust object's
certificate chain in order to find at least one certificate pinned to the
given domain. SecTrustEvaluate() should always be called before this method to
ensure that the certificate chain is valid.


### Convenience delegate classes for NSURLConnection and NSURLSession

This library also provides convenience classes for connections relying on
NSURLConnection and NSURLSession. The ISPPinnedNSURLConnectionDelegate and
ISPPinnedNSURLSessionDelegate implement the connection authentication methods
within respectively the NSURLConnectionDelegate and NSURLSessionDelegate
protocols, in order to automatically validate the server's certificate based on
SSL pins loaded using the setupSSLPinsUsingDictionnary: method.

To implement certificate pinning in their Apps, developers should simply extend
these classes when creating their own connection delegates.


### Sample code

The Xcode unit tests within SSLCertificatePinningTests contain sample code
demonstrating how to implement certificate pinning when using NSURLConnection
and NSURLSession.


### Changelog

* v3: Turned the Xcode project into a static library.
Added certificate pinning delegate class for NSURLSession connections.
* v2: Added the ability to pin multiple certificates to a single domain.
* v1: Initial release.


### License

See ../LICENSE.


### Author

Alban Diquet - https://github.com/nabla-c0d3
Loading