SSL_SESSION_set1_id.pod 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get_id,
  4. SSL_SESSION_set1_id
  5. - get and set the SSL session ID
  6. =head1 SYNOPSIS
  7. #include <openssl/ssl.h>
  8. const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
  9. unsigned int *len)
  10. int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid,
  11. unsigned int sid_len);
  12. =head1 DESCRIPTION
  13. SSL_SESSION_get_id() returns a pointer to the internal session id value for the
  14. session B<s>. The length of the id in bytes is stored in B<*len>. The length may
  15. be 0. The caller should not free the returned pointer directly.
  16. SSL_SESSION_set1_id() sets the session ID for the B<ssl> SSL/TLS session
  17. to B<sid> of length B<sid_len>.
  18. =head1 RETURN VALUES
  19. SSL_SESSION_get_id() returns a pointer to the session id value.
  20. SSL_SESSION_set1_id() returns 1 for success and 0 for failure, for example
  21. if the supplied session ID length exceeds B<SSL_MAX_SSL_SESSION_ID_LENGTH>.
  22. =head1 SEE ALSO
  23. L<ssl(7)>
  24. =head1 HISTORY
  25. SSL_SESSION_set1_id() was first added to OpenSSL 1.1.0
  26. =head1 COPYRIGHT
  27. Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
  28. Licensed under the OpenSSL license (the "License"). You may not use
  29. this file except in compliance with the License. You can obtain a copy
  30. in the file LICENSE in the source distribution or at
  31. L<https://www.openssl.org/source/license.html>.
  32. =cut