Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non-printable HTTP passwords #143

Merged
merged 1 commit into from
Jun 17, 2021

Commits on May 21, 2021

  1. Add support for non-printable HTTP passwords

    The OCPP 1.6 Security Whitepaper foresees that the AuthorizationKey,
    which is a hexadecimal string representation of the HTTP Basic
    Authentication password to be used, may use the full byte range, i.e.
    including non-printable characters. Thus, passing it as a Java String
    object is not suitable.
    
    In contrast, OCPP 2.0.1 specifies the password as being a string of
    printable UTF-8 characters. The library already supports that.
    
    To accomodate both, take advantage of the fact that JSONConfiguration
    treats all parameters as Objects, so either a String or a byte array can
    be set.
    
    Change the code adding the credentials to the HTTP header to correctly
    generate the Base64 encoded credentials from either a password string or
    a byte array, depending on the object type that was set as the password.
    robert-s-ubi committed May 21, 2021
    Configuration menu
    Copy the full SHA
    f7af06d View commit details
    Browse the repository at this point in the history