summaryrefslogtreecommitdiffstats
path: root/ssl/t1_ext.c
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-28Rename some callbacks, fix alignment.Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 0cfefe4b6dcc6947c236b0f10a7f9e2f02273075)
2014-08-28Use consistent function naming.Dr. Stephen Henson
Instead of SSL_CTX_set_custom_cli_ext and SSL_CTX_set_custom_srv_ext use SSL_CTX_add_client_custom_ext and SSL_CTX_add_server_custom_ext. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 8cafe9e8bfcc99d12adf083c61411955995668c4)
2014-08-28New function SSL_extension_supported().Dr. Stephen Henson
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit c846a5f5678a7149bc6cbd37dbdae886a5108364)
2014-08-28New extension callback features.Dr. Stephen Henson
Support separate parse and add callback arguments. Add new callback so an application can free extension data. Change return value for send functions so < 0 is an error 0 omits extension and > 0 includes it. This is more consistent with the behaviour of other functions in OpenSSL. Modify parse_cb handling so <= 0 is an error. Make SSL_CTX_set_custom_cli_ext and SSL_CTX_set_custom_cli_ext argument order consistent. NOTE: these changes WILL break existing code. Remove (now inaccurate) in line documentation. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 33f653adf3bff5b0795e22de1f54b7c5472252d0)
2014-08-28Callback revision.Dr. Stephen Henson
Use "parse" and "add" for function and callback names instead of "first" and "second". Change arguments to callback so the extension type is unsigned int and the buffer length is size_t. Note: this *will* break existing code. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit de2a9e38f39eacc2e052d694f5b5fa5b7e734abc)
2014-08-28Add custom extension sanity checks.Dr. Stephen Henson
Reject attempts to use extensions handled internally. Add flags to each extension structure to indicate if an extension has been sent or received. Enforce RFC5246 compliance by rejecting duplicate extensions and unsolicited extensions and only send a server extension if we have sent the corresponding client extension. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 28ea0a0c6a5e4e217c405340fa22a8503c7a17db)
2014-08-28Custom extension revision.Dr. Stephen Henson
Use the same structure for client and server custom extensions. Add utility functions in new file t1_ext.c. Use new utility functions to handle custom server and client extensions and remove a lot of code duplication. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit ecf4d660902dcef6e0afc51d52926f00d409ee6b) Conflicts: ssl/ssl_lib.c ssl/ssl_locl.h ssl/t1_lib.c