Skip to content
  • Ander Juaristi's avatar
    psk: Allow non-NULL PSK usernames · d0063899
    Ander Juaristi authored
    This commit closes #586
    
    .
    
    Two new functions are introduced: gnutls_psk_server_get_username2()
    and gnutls_psk_set_client_username2(), which are identical in behavior
    to those named similarly (without the final '2'), but allow arbitrary
    gnutls datums (not strings) to be used as usernames.
    
    Two new callback functions are also introduced, with their respective
    setters: gnutls_psk_set_server_credentials_function2() and
    gnutls_psk_set_client_credentials_function2().
    
    In addition, the password file format is extended so that non-string
    usernames can be specified. A leading '#' character tells GnuTLS that the
    username should be interpreted as a raw byte string (encoded in HEX).
    
    Example:
    
        #deadbeef:9e32cf7786321a828ef7668f09fb35db
    
    Signed-off-by: default avatarAnder Juaristi's avatarAnder Juaristi <a@juaristi.eus>
    d0063899