rabbitmq-c  0.5.0
C AMQP Client library for RabbitMQ
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
amqp_ssl_socket.h
Go to the documentation of this file.
1 /* vim:set ft=c ts=2 sw=2 sts=2 et cindent: */
3 /*
4  * Copyright 2012-2013 Michael Steinert
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef AMQP_SSL_H
26 #define AMQP_SSL_H
27 
28 #include <amqp.h>
29 
30 AMQP_BEGIN_DECLS
31 
53 AMQP_PUBLIC_FUNCTION
54 amqp_socket_t *
55 AMQP_CALL
57 
69 AMQP_PUBLIC_FUNCTION
70 int
71 AMQP_CALL
72 amqp_ssl_socket_set_cacert(amqp_socket_t *self,
73  const char *cacert);
74 
87 AMQP_PUBLIC_FUNCTION
88 int
89 AMQP_CALL
90 amqp_ssl_socket_set_key(amqp_socket_t *self,
91  const char *cert,
92  const char *key);
93 
107 AMQP_PUBLIC_FUNCTION
108 int
109 AMQP_CALL
110 amqp_ssl_socket_set_key_buffer(amqp_socket_t *self,
111  const char *cert,
112  const void *key,
113  size_t n);
114 
127 AMQP_PUBLIC_FUNCTION
128 void
129 AMQP_CALL
130 amqp_ssl_socket_set_verify(amqp_socket_t *self,
131  amqp_boolean_t verify);
132 
157 AMQP_PUBLIC_FUNCTION
158 void
159 AMQP_CALL
161 
162 AMQP_END_DECLS
163 
164 #endif /* AMQP_SSL_H */
amqp_socket_t * amqp_ssl_socket_new(amqp_connection_state_t state)
Create a new SSL/TLS socket object.
int amqp_ssl_socket_set_key(amqp_socket_t *self, const char *cert, const char *key)
Set the client key.
void amqp_set_initialize_ssl_library(amqp_boolean_t do_initialize)
Sets whether rabbitmq-c initializes the underlying SSL library.
int amqp_boolean_t
boolean type 0 = false, true otherwise
Definition: amqp.h:349
int amqp_ssl_socket_set_key_buffer(amqp_socket_t *self, const char *cert, const void *key, size_t n)
Set the client key from a buffer.
int amqp_ssl_socket_set_cacert(amqp_socket_t *self, const char *cacert)
Set the CA certificate.
void amqp_ssl_socket_set_verify(amqp_socket_t *self, amqp_boolean_t verify)
Enable or disable peer verification.
struct amqp_connection_state_t_ * amqp_connection_state_t
connection state object
Definition: amqp.h:644