0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
Heiko Hund
e9a903fd9f add support for the --peer-fingerprint option
This option lets you specify the SHA256 fingerprint of a peer's self-signed
certificate. The peer's certificate, presented during connection bring-up,
is compared to the fingerprint. The connection fails if it doesn't
match.

So, this serves as an easy, yet secure, alternative to setting up a PKI,
but can also be used in conjunction with one to add one more check during
leaf certificate validation.

The option can also be given as inline block, for easier management for
multiple fingerprints:

  <peer-fingerprint>
  00:11:22:33:...:BB:CC:DD:FF
  BB:CC:DD:FF:...:00:11:22:33
  </peer-fingerprint>

Signed-off-by: Heiko Hund <heiko@openvpn.net>
2021-04-28 23:56:22 +02:00
David Sommerseth
3fbe0a2701
Update copyrights
Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-03-18 19:37:32 +01:00
James Yonan
bee0d8d187
SSL: added SSLConst::SEND_CLIENT_CA_LIST server-side flag and implemented for OpenSSL
If SEND_CLIENT_CA_LIST is enabled, we will call SSL_CTX_add_client_CA
for each CA specified in the config.  This will direct OpenSSL to
transmit a list of client CA names to the client so it can choose
an appropriate client certificate.

Signed-off-by: James Yonan <james@openvpn.net>
2019-06-19 18:21:02 +02:00
James Yonan
bbae814864
OpenSSL: added SNI implementation
On the server side, we add the abstract base class
SNIHandlerBase to provide a hook (sni_hello) where
servers can inspect the SNI name given in the client
hello message and possibly return a different SSLFactoryAPI.

In other changes, we rename the ENABLE_SNI flag to
ENABLE_CLIENT_SNI to be clear that this flag only affects
the client-side SNI implementation.

We also add the NO_VERIFY_HOSTNAME flag on the client side
to allow the SNI name to be transmitted to the server
without requiring a match between the SNI name and the
common name or subject alternative name in the server
certificate.

Signed-off-by: James Yonan <james@openvpn.net>
2019-06-19 18:21:00 +02:00
James Yonan
72e9f858e4
SSL: added SSLConst::PEER_CERT_OPTIONAL flag and implemented for OpenSSL
Signed-off-by: James Yonan <james@openvpn.net>
2019-05-16 14:50:06 +02:00
David Sommerseth
16b10559f2 [OVPN3-140] Update company names in copyrights
OpenVPN Technologies, Inc. change their name to OpenVPN Inc. during the
autumn of 2017.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
David Sommerseth
6caca2c313 [OVPN3-140] Relicense back to AGPLv3
This is essentially a revert of commit 04b2a3c9b7 and commit
ef42e59e05.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
James Yonan
0090c51978 SSLConst: added new ssl_flags() method which filters out
non-ssl flags from given argument.

Signed-off-by: James Yonan <james@openvpn.net>
2017-12-22 17:59:38 +08:00
James Yonan
5b5af36775 Added SSLConst::SERVER_TO_SERVER flag
SSLConst::SERVER_TO_SERVER allows X509 certificates to be
used in a meshed toplology, where a server certificate can
be used for either the client or server side of an SSL
connection.

Currently only implemented for OpenSSL.

Signed-off-by: James Yonan <james@openvpn.net>
2017-09-27 16:16:18 +08:00
James Yonan
b2cd82a5bf copyright: updated to 2017.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 13:11:09 -06:00
Samuli Seppänen
04b2a3c9b7 Switch from AGPLv3 to GPLv3
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-03-16 14:43:55 +02:00
James Yonan
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -06:00
James Yonan
fc249e6a46 OpenSSL, AuthCert : implemented DEFERRED_CERT_VERIFY SSL
flag, to allow server-side SSL users to get information
about client certificate validation errors without
immediately terminating the connection.  This allows
certificate errors to be handled at a higher level, such
as by messaging error info to the peer over the TLS control
channel.
2016-07-30 15:17:57 -07:00
James Yonan
099e8dc70e SSL : added SSLConst::ENABLE_SNI flag to enable SNI (Server
Name Indication) when hostname is provided.
2016-05-06 15:29:16 -06:00
James Yonan
6fcf70463e Added SSLConst::NO_VERIFY_PEER flag for SSL servers that don't
require client authentication.
2015-04-19 00:03:13 -06:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
d9b5cdf588 Core: SSL layer changes:
* Renamed SSL method write_ciphertext_ready() to
  read_cleartext_ready() for clarity.

* It's important that read_cleartext_ready() returns an accurate
  status.  To this end, add ssl_get_bytes_avail to the return
  expression for PolarSSL:

    return !ct_in.empty() || ssl_get_bytes_avail(ssl);

  This will also consider buffering inside of PolarSSL,
  and avoid potential deadlocks.

  Other SSL modules (AppleCrypto and OpenSSL) have been
  commented to warn of this issue.

* Factored out constants such as SHOULD_RETRY to namespace
  SSLConst.

* Added flags var to SSL configs.

* Added new SSL flag LOG_VERIFY_STATUS.  If disabled,
  makes for a quiet SSL negotiation if no errors.

* Detect SSL partial writes and designate a new error status
  code (SSL_PARTIAL_WRITE).

* In ProtoStackBase, detect unclassified errors from SSL layer
  (throw unknown_status_from_ssl_layer).

* PolarSSL module now recognizes Close Notify status and returns
  SSLConst::PEER_CLOSE_NOTIFY.

* In ProtoStackBase, factored out some error handling into
  common method.
2014-08-10 19:34:00 -06:00