~ubuntu-branches/ubuntu/quantal/gnutls26/quantal

« back to all changes in this revision

Viewing changes to libextra/gnutls_ia.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation
 
2
 * Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation,
 
3
 * Inc.
3
4
 *
4
5
 * Author: Simon Josefsson
5
6
 *
6
 
 * This file is part of GNUTLS-EXTRA.
 
7
 * This file is part of GnuTLS-EXTRA.
7
8
 *
8
 
 * GNUTLS-EXTRA is free software: you can redistribute it and/or modify
 
9
 * GnuTLS-extra is free software: you can redistribute it and/or modify
9
10
 * it under the terms of the GNU General Public License as published by
10
11
 * the Free Software Foundation, either version 3 of the License, or
11
12
 * (at your option) any later version.
12
13
 *
13
 
 * GNUTLS-EXTRA is distributed in the hope that it will be useful,
 
14
 * GnuTLS-extra is distributed in the hope that it will be useful,
14
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
17
 * GNU General Public License for more details.
370
371
}
371
372
 
372
373
/**
373
 
 * gnutls_ia_send: Send peer the specified TLS/IA data.
 
374
 * gnutls_ia_send:
374
375
 * @session: is a #gnutls_session_t structure.
375
376
 * @data: contains the data to send
376
377
 * @sizeofdata: is the length of the data
409
410
}
410
411
 
411
412
/**
412
 
 * gnutls_ia_recv - read data from the TLS/IA protocol
 
413
 * gnutls_ia_recv:
413
414
 * @session: is a #gnutls_session_t structure.
414
415
 * @data: the buffer that the data will be read into, must hold >= 12 bytes.
415
416
 * @sizeofdata: the number of requested bytes, must be >= 12.
652
653
}
653
654
 
654
655
/**
655
 
 * gnutls_ia_allocate_client_credentials - Used to allocate an gnutls_ia_server_credentials_t structure
 
656
 * gnutls_ia_allocate_client_credentials:
656
657
 * @sc: is a pointer to a #gnutls_ia_server_credentials_t structure.
657
658
 *
658
659
 * This structure is complex enough to manipulate directly thus this
660
661
 *
661
662
 * Adding this credential to a session will enable TLS/IA, and will
662
663
 * require an Application Phase after the TLS handshake (if the server
663
 
 * support TLS/IA).  Use gnutls_ia_require_inner_phase() to toggle the
664
 
 * TLS/IA mode.
 
664
 * support TLS/IA).  Use gnutls_ia_enable() to toggle the TLS/IA mode.
665
665
 *
666
666
 * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise
667
667
 *   an error code is returned.
678
678
}
679
679
 
680
680
/**
681
 
 * gnutls_ia_free_client_credentials - Used to free an allocated #gnutls_ia_client_credentials_t structure
 
681
 * gnutls_ia_free_client_credentials:
682
682
 * @sc: is a #gnutls_ia_client_credentials_t structure.
683
683
 *
684
684
 * This structure is complex enough to manipulate directly thus this
692
692
}
693
693
 
694
694
/**
695
 
 * gnutls_ia_set_client_avp_function - Used to set a AVP callback
 
695
 * gnutls_ia_set_client_avp_function:
696
696
 * @cred: is a #gnutls_ia_client_credentials_t structure.
697
697
 * @avp_func: is the callback function
698
698
 *
733
733
}
734
734
 
735
735
/**
736
 
 * gnutls_ia_set_client_avp_ptr - Sets a pointer to be sent to TLS/IA callback
 
736
 * gnutls_ia_set_client_avp_ptr:
737
737
 * @cred: is a #gnutls_ia_client_credentials_t structure.
738
738
 * @ptr: is the pointer
739
739
 *
747
747
}
748
748
 
749
749
/**
750
 
 * gnutls_ia_get_client_avp_ptr - Returns the pointer which is sent to TLS/IA callback
 
750
 * gnutls_ia_get_client_avp_ptr:
751
751
 * @cred: is a #gnutls_ia_client_credentials_t structure.
752
752
 *
753
753
 * Returns the pointer that will be provided to the TLS/IA callback
762
762
}
763
763
 
764
764
/**
765
 
 * gnutls_ia_allocate_server_credentials - Used to allocate an gnutls_ia_server_credentials_t structure
 
765
 * gnutls_ia_allocate_server_credentials:
766
766
 * @sc: is a pointer to a #gnutls_ia_server_credentials_t structure.
767
767
 *
768
768
 * This structure is complex enough to manipulate directly thus this
770
770
 *
771
771
 * Adding this credential to a session will enable TLS/IA, and will
772
772
 * require an Application Phase after the TLS handshake (if the client
773
 
 * support TLS/IA).  Use gnutls_ia_require_inner_phase() to toggle the
774
 
 * TLS/IA mode.
 
773
 * support TLS/IA).  Use gnutls_ia_enable() to toggle the TLS/IA mode.
775
774
 *
776
775
 * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise
777
776
 *   an error code is returned.
788
787
}
789
788
 
790
789
/**
791
 
 * gnutls_ia_free_server_credentials - Used to free an allocated #gnutls_ia_server_credentials_t structure
 
790
 * gnutls_ia_free_server_credentials:
792
791
 * @sc: is a #gnutls_ia_server_credentials_t structure.
793
792
 *
794
793
 * This structure is complex enough to manipulate directly thus this
802
801
}
803
802
 
804
803
/**
805
 
 * gnutls_ia_set_server_credentials_function - Used to set a AVP callback
 
804
 * gnutls_ia_set_server_credentials_function:
806
805
 * @cred: is a #gnutls_ia_server_credentials_t structure.
807
806
 * @func: is the callback function
808
807
 *
850
849
}
851
850
 
852
851
/**
853
 
 * gnutls_ia_set_server_avp_ptr - Sets a pointer to be sent to TLS/IA callback
 
852
 * gnutls_ia_set_server_avp_ptr:
854
853
 * @cred: is a #gnutls_ia_client_credentials_t structure.
855
854
 * @ptr: is the pointer
856
855
 *
864
863
}
865
864
 
866
865
/**
867
 
 * gnutls_ia_get_server_avp_ptr - Returns the pointer which is sent to TLS/IA callback
 
866
 * gnutls_ia_get_server_avp_ptr:
868
867
 * @cred: is a #gnutls_ia_client_credentials_t structure.
869
868
 *
870
869
 * Returns the pointer that will be provided to the TLS/IA callback
879
878
}
880
879
 
881
880
/**
882
 
 * gnutls_ia_enable - Indicate willingness for TLS/IA application phases
 
881
 * gnutls_ia_enable:
883
882
 * @session: is a #gnutls_session_t structure.
884
883
 * @allow_skip_on_resume: non-zero if local party allows to skip the
885
884
 *                        TLS/IA application phases for a resumed session.