Home | History | Annotate | Line # | Download | only in man3
      1      1.1  christos =pod
      2      1.1  christos 
      3      1.1  christos =head1 NAME
      4      1.1  christos 
      5      1.1  christos SSL_in_before,
      6      1.1  christos SSL_in_init,
      7      1.1  christos SSL_is_init_finished,
      8      1.1  christos SSL_in_connect_init,
      9      1.1  christos SSL_in_accept_init,
     10      1.1  christos SSL_get_state
     11      1.1  christos - retrieve information about the handshake state machine
     12      1.1  christos 
     13      1.1  christos =head1 SYNOPSIS
     14      1.1  christos 
     15      1.1  christos  #include <openssl/ssl.h>
     16      1.1  christos 
     17      1.1  christos  int SSL_in_init(const SSL *s);
     18      1.1  christos  int SSL_in_before(const SSL *s);
     19      1.1  christos  int SSL_is_init_finished(const SSL *s);
     20      1.1  christos 
     21      1.1  christos  int SSL_in_connect_init(SSL *s);
     22      1.1  christos  int SSL_in_accept_init(SSL *s);
     23      1.1  christos 
     24      1.1  christos  OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
     25      1.1  christos 
     26      1.1  christos =head1 DESCRIPTION
     27      1.1  christos 
     28      1.1  christos SSL_in_init() returns 1 if the SSL/TLS state machine is currently processing or
     29      1.1  christos awaiting handshake messages, or 0 otherwise.
     30      1.1  christos 
     31      1.1  christos SSL_in_before() returns 1 if no SSL/TLS handshake has yet been initiated, or 0
     32      1.1  christos otherwise.
     33      1.1  christos 
     34      1.1  christos SSL_is_init_finished() returns 1 if the SSL/TLS connection is in a state where
     35      1.1  christos fully protected application data can be transferred or 0 otherwise.
     36      1.1  christos 
     37      1.1  christos Note that in some circumstances (such as when early data is being transferred)
     38      1.1  christos SSL_in_init(), SSL_in_before() and SSL_is_init_finished() can all return 0.
     39      1.1  christos 
     40      1.1  christos SSL_in_connect_init() returns 1 if B<s> is acting as a client and SSL_in_init()
     41      1.1  christos would return 1, or 0 otherwise.
     42      1.1  christos 
     43      1.1  christos SSL_in_accept_init() returns 1 if B<s> is acting as a server and SSL_in_init()
     44      1.1  christos would return 1, or 0 otherwise.
     45      1.1  christos 
     46      1.1  christos SSL_in_connect_init() and SSL_in_accept_init() are implemented as macros.
     47      1.1  christos 
     48      1.1  christos SSL_get_state() returns a value indicating the current state of the handshake
     49      1.1  christos state machine. OSSL_HANDSHAKE_STATE is an enumerated type where each value
     50      1.1  christos indicates a discrete state machine state. Note that future versions of OpenSSL
     51      1.1  christos may define more states so applications should expect to receive unrecognised
     52      1.1  christos state values. The naming format is made up of a number of elements as follows:
     53      1.1  christos 
     54      1.1  christos B<protocol>_ST_B<role>_B<message>
     55      1.1  christos 
     56      1.1  christos B<protocol> is one of TLS or DTLS. DTLS is used where a state is specific to the
     57      1.1  christos DTLS protocol. Otherwise TLS is used.
     58      1.1  christos 
     59      1.1  christos B<role> is one of CR, CW, SR or SW to indicate "client reading",
     60      1.1  christos "client writing", "server reading" or "server writing" respectively.
     61      1.1  christos 
     62      1.1  christos B<message> is the name of a handshake message that is being or has been sent, or
     63      1.1  christos is being or has been processed.
     64      1.1  christos 
     65      1.1  christos Additionally there are some special states that do not conform to the above
     66      1.1  christos format. These are:
     67      1.1  christos 
     68      1.1  christos =over 4
     69      1.1  christos 
     70      1.1  christos =item TLS_ST_BEFORE
     71      1.1  christos 
     72      1.1  christos No handshake messages have yet been been sent or received.
     73      1.1  christos 
     74      1.1  christos =item TLS_ST_OK
     75      1.1  christos 
     76      1.1  christos Handshake message sending/processing has completed.
     77      1.1  christos 
     78      1.1  christos =item TLS_ST_EARLY_DATA
     79      1.1  christos 
     80      1.1  christos Early data is being processed
     81      1.1  christos 
     82      1.1  christos =item TLS_ST_PENDING_EARLY_DATA_END
     83      1.1  christos 
     84      1.1  christos Awaiting the end of early data processing
     85      1.1  christos 
     86      1.1  christos =back
     87      1.1  christos 
     88      1.1  christos =head1 RETURN VALUES
     89      1.1  christos 
     90      1.1  christos SSL_in_init(), SSL_in_before(), SSL_is_init_finished(), SSL_in_connect_init()
     91      1.1  christos and SSL_in_accept_init() return values as indicated above.
     92      1.1  christos 
     93      1.1  christos SSL_get_state() returns the current handshake state.
     94      1.1  christos 
     95      1.1  christos 
     96      1.1  christos =head1 SEE ALSO
     97      1.1  christos 
     98      1.1  christos L<ssl(7)>,
     99      1.1  christos L<SSL_read_early_data(3)>
    100      1.1  christos 
    101      1.1  christos =head1 COPYRIGHT
    102      1.1  christos 
    103      1.1  christos Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
    104      1.1  christos 
    105  1.1.1.2  christos Licensed under the Apache License 2.0 (the "License").  You may not use
    106      1.1  christos this file except in compliance with the License.  You can obtain a copy
    107      1.1  christos in the file LICENSE in the source distribution or at
    108      1.1  christos L<https://www.openssl.org/source/license.html>.
    109      1.1  christos 
    110      1.1  christos =cut
    111