xref: /qemu/migration/tls.h (revision 0deb7e9b)
141d64227SJuan Quintela /*
241d64227SJuan Quintela  * QEMU migration TLS support
341d64227SJuan Quintela  *
441d64227SJuan Quintela  * Copyright (c) 2015 Red Hat, Inc.
541d64227SJuan Quintela  *
641d64227SJuan Quintela  * This library is free software; you can redistribute it and/or
741d64227SJuan Quintela  * modify it under the terms of the GNU Lesser General Public
841d64227SJuan Quintela  * License as published by the Free Software Foundation; either
9ef19b50dSChetan Pant  * version 2.1 of the License, or (at your option) any later version.
1041d64227SJuan Quintela  *
1141d64227SJuan Quintela  * This library is distributed in the hope that it will be useful,
1241d64227SJuan Quintela  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1341d64227SJuan Quintela  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1441d64227SJuan Quintela  * Lesser General Public License for more details.
1541d64227SJuan Quintela  *
1641d64227SJuan Quintela  * You should have received a copy of the GNU Lesser General Public
1741d64227SJuan Quintela  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
1841d64227SJuan Quintela  *
1941d64227SJuan Quintela  */
2041d64227SJuan Quintela 
2141d64227SJuan Quintela #ifndef QEMU_MIGRATION_TLS_H
2241d64227SJuan Quintela #define QEMU_MIGRATION_TLS_H
2341d64227SJuan Quintela 
2441d64227SJuan Quintela #include "io/channel.h"
25bfb790e7SChuan Zheng #include "io/channel-tls.h"
2641d64227SJuan Quintela 
2741d64227SJuan Quintela void migration_tls_channel_process_incoming(MigrationState *s,
2841d64227SJuan Quintela                                             QIOChannel *ioc,
2941d64227SJuan Quintela                                             Error **errp);
3041d64227SJuan Quintela 
310deb7e9bSJuan Quintela QIOChannelTLS *migration_tls_client_create(QIOChannel *ioc,
32bfb790e7SChuan Zheng                                            const char *hostname,
33bfb790e7SChuan Zheng                                            Error **errp);
34bfb790e7SChuan Zheng 
3541d64227SJuan Quintela void migration_tls_channel_connect(MigrationState *s,
3641d64227SJuan Quintela                                    QIOChannel *ioc,
3741d64227SJuan Quintela                                    const char *hostname,
3841d64227SJuan Quintela                                    Error **errp);
3985a8578eSPeter Xu 
4085a8578eSPeter Xu /* Whether the QIO channel requires further TLS handshake? */
4185a8578eSPeter Xu bool migrate_channel_requires_tls_upgrade(QIOChannel *ioc);
4285a8578eSPeter Xu 
4341d64227SJuan Quintela #endif
44