SSL_SESSION_get0_id_context.pod 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get0_id_context,
  4. SSL_SESSION_set1_id_context
  5. - get and set the SSL ID context associated with a session
  6. =head1 SYNOPSIS
  7. #include <openssl/ssl.h>
  8. const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s,
  9. unsigned int *len);
  10. int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,
  11. unsigned int sid_ctx_len);
  12. =head1 DESCRIPTION
  13. See L<SSL_CTX_set_session_id_context(3)> for further details on session ID
  14. contexts.
  15. SSL_SESSION_get0_id_context() returns the ID context associated with
  16. the SSL/TLS session B<s>. The length of the ID context is written to
  17. B<*len> if B<len> is not NULL.
  18. The value returned is a pointer to an object maintained within B<s> and
  19. should not be released.
  20. SSL_SESSION_set1_id_context() takes a copy of the provided ID context given in
  21. B<sid_ctx> and associates it with the session B<s>. The length of the ID context
  22. is given by B<sid_ctx_len> which must not exceed SSL_MAX_SID_CTX_LENGTH bytes.
  23. =head1 RETURN VALUES
  24. SSL_SESSION_set1_id_context() returns 1 on success or 0 on error.
  25. =head1 SEE ALSO
  26. L<ssl(7)>,
  27. L<SSL_set_session_id_context(3)>
  28. =head1 HISTORY
  29. The SSL_SESSION_get0_id_context() function was added in OpenSSL 1.1.0.
  30. =head1 COPYRIGHT
  31. Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
  32. Licensed under the Apache License 2.0 (the "License"). You may not use
  33. this file except in compliance with the License. You can obtain a copy
  34. in the file LICENSE in the source distribution or at
  35. L<https://www.openssl.org/source/license.html>.
  36. =cut