X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=6ccdbf8dde8a035572734ba23f259c185076f97e;hp=ffa0e14afb097e775e18cc0257f0e56d7256d9a9;hb=f1a34da3b2f5336e4993a729e5ac2130d0e0595a;hpb=75870d7b55e36af526a0786fff94912989c73fd1;ds=sidebyside diff --git a/pppd/auth.c b/pppd/auth.c index ffa0e14..6ccdbf8 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -258,6 +258,8 @@ char *privkey_file = NULL; /* client private key file (pem format) */ char *crl_dir = NULL; /* directory containing CRL files */ char *crl_file = NULL; /* Certificate Revocation List (CRL) file (pem format) */ char *max_tls_version = NULL; /* Maximum TLS protocol version (default=1.2) */ +char *tls_verify_method = NULL; +bool tls_verify_key_usage = 0; bool need_peer_eap = 0; /* Require peer to authenticate us */ #endif @@ -445,6 +447,10 @@ option_t auth_options[] = { { "crl", o_string, &crl_file, "Use specific CRL file" }, { "max-tls-version", o_string, &max_tls_version, "Maximum TLS version (1.0/1.1/1.2 (default)/1.3)" }, + { "tls-verify-key-usage", o_bool, &tls_verify_key_usage, + "Verify certificate type and extended key usage" }, + { "tls-verify-method", o_string, &tls_verify_method, + "Verify peer by method (none|subject|name|suffix)" }, { "need-peer-eap", o_bool, &need_peer_eap, "Require the peer to authenticate us", 1 }, #endif /* USE_EAPTLS */ @@ -876,8 +882,8 @@ network_phase(int unit) /* * If the peer had to authenticate, run the auth-up script now. */ + notify(auth_up_notifier, 0); if (go->neg_chap || go->neg_upap || go->neg_eap) { - notify(auth_up_notifier, 0); auth_state = s_up; if (auth_script_state == s_down && auth_script_pid == 0) { auth_script_state = s_up;