int ossl_quic_has_pending(const SSL *s);
int ossl_quic_get_shutdown(const SSL *s);
+/*
+ * Set QLOG diagnostic title. String is copied internally on success and need
+ * not remain allocated. Only has any effect if logging has not already begun.
+ * For use by tests only. Setting this on a context affects any QCSO created
+ * after this is called but does not affect QCSOs already created from a
+ * context.
+ */
+int ossl_quic_set_diag_title(SSL_CTX *ctx, const char *title);
+
# endif
#endif
size_t num_ack_range_scratch;
/* Title for QLOG purposes. We own this copy. */
- char *quic_channel_local;
+ char *qlog_title;
};
# endif
}
#ifndef OPENSSL_NO_QLOG
args.use_qlog = 1; /* disabled if env not set */
+ args.qlog_title = qc->ssl.ctx->qlog_title;
#endif
port_args.channel_ctx = qc->ssl.ctx;
return ctx.qc->ch;
}
+
+int ossl_quic_set_diag_title(SSL_CTX *ctx, const char *title)
+{
+#ifndef OPENSSL_NO_QLOG
+ OPENSSL_free(ctx->qlog_title);
+ ctx->qlog_title = NULL;
+
+ if (title == NULL)
+ return 1;
+
+ if ((ctx->qlog_title = OPENSSL_strdup(title)) == NULL)
+ return 0;
+#endif
+
+ return 1;
+}
#endif
OPENSSL_free(a->propq);
+#ifndef OPENSSL_NO_QLOG
+ OPENSSL_free(a->qlog_title);
+#endif
OPENSSL_free(a);
}
size_t client_cert_type_len;
unsigned char *server_cert_type;
size_t server_cert_type_len;
+
+# ifndef OPENSSL_NO_QLOG
+ char *qlog_title; /* Session title for QLOG */
+# endif
};
typedef struct cert_pkey_st CERT_PKEY;