Skip to content

Compilation error with "--no-psk" flag enabled #6239

@davxy

Description

@davxy

Ref. Commit: 48a0316

Inconditional invocation of psk_server_callback of the ssl_st.

  if (SSL_IS_TLS13(s)) {
        int j;
       ...
        if (s->psk_server_callback != NULL) {
            for (j = 0; j < SSL_PKEY_NUM && !ssl_has_cert(s, j); j++);
            if (j == SSL_PKEY_NUM) {
                /* There are no certificates */
                prefer_sha256 = 1;
            }
        }

Results in compilation error in case the --no-psk option has been is enabled

struct ssl_st {
    ...
    int error_code;
# ifndef OPENSSL_NO_PSK
    SSL_psk_client_cb_func psk_client_callback;
    SSL_psk_server_cb_func psk_server_callback;
# endif
   ...
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions