ssl/tls: add proper const attributes to functions, context members