> >> @@ -369,7 +369,7 @@ bool >> send_auth_pending_messages(struct tls_multi *tls_multi, const char *extra, >> unsigned int timeout) >> { >> - struct key_state *ks = &tls_multi->session[TM_ACTIVE].key[KS_PRIMARY]; >> + struct key_state *ks = get_key_scan(tls_multi, 0); > > why not calling get_primary_key() here and in all other spots where we > ask for the 0th key in the scan? >
This function needs a non-const variant and get_primary_key returns a const struct. >> +/** gets an item of \c key_state objects in the >> + * order they should be scanned by data >> + * channel modules. */ >> +static inline const struct key_state * >> +get_primary_key(const struct tls_multi *multi) >> +{ >> + return &multi->session[TM_ACTIVE].key[KS_PRIMARY]; >> +} > > Why not implementing this as get_key_scan(multi, 0); ? > That breaks the constness of the argument. Arne _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel