1*3a184c67SAntonio Huete Jimenez /* $NetBSD: ssl.h,v 1.5 2021/08/27 01:38:49 lukem Exp $ */ 2*3a184c67SAntonio Huete Jimenez /* from NetBSD: ssl.h,v 1.5 2021/06/03 10:23:33 lukem Exp */ 36cdfca03SJohn Marino 46cdfca03SJohn Marino /*- 5*3a184c67SAntonio Huete Jimenez * Copyright (c) 2012-2021 The NetBSD Foundation, Inc. 66cdfca03SJohn Marino * All rights reserved. 76cdfca03SJohn Marino * 86cdfca03SJohn Marino * Redistribution and use in source and binary forms, with or without 96cdfca03SJohn Marino * modification, are permitted provided that the following conditions 106cdfca03SJohn Marino * are met: 116cdfca03SJohn Marino * 1. Redistributions of source code must retain the above copyright 126cdfca03SJohn Marino * notice, this list of conditions and the following disclaimer. 136cdfca03SJohn Marino * 2. Redistributions in binary form must reproduce the above copyright 146cdfca03SJohn Marino * notice, this list of conditions and the following disclaimer in the 156cdfca03SJohn Marino * documentation and/or other materials provided with the distribution. 166cdfca03SJohn Marino * 176cdfca03SJohn Marino * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 186cdfca03SJohn Marino * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 196cdfca03SJohn Marino * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 206cdfca03SJohn Marino * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 216cdfca03SJohn Marino * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 226cdfca03SJohn Marino * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 236cdfca03SJohn Marino * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 246cdfca03SJohn Marino * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 256cdfca03SJohn Marino * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 266cdfca03SJohn Marino * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 276cdfca03SJohn Marino * POSSIBILITY OF SUCH DAMAGE. 286cdfca03SJohn Marino */ 296cdfca03SJohn Marino 306cdfca03SJohn Marino #define FETCH struct fetch_connect 316cdfca03SJohn Marino struct fetch_connect; 326cdfca03SJohn Marino 336cdfca03SJohn Marino int fetch_printf(struct fetch_connect *, const char *fmt, ...) 346cdfca03SJohn Marino ; 356cdfca03SJohn Marino int fetch_fileno(struct fetch_connect *); 366cdfca03SJohn Marino int fetch_error(struct fetch_connect *); 376cdfca03SJohn Marino int fetch_flush(struct fetch_connect *); 386cdfca03SJohn Marino struct fetch_connect *fetch_open(const char *, const char *); 396cdfca03SJohn Marino struct fetch_connect *fetch_fdopen(int, const char *); 406cdfca03SJohn Marino int fetch_close(struct fetch_connect *); 41*3a184c67SAntonio Huete Jimenez size_t fetch_read(void *, size_t, size_t, struct fetch_connect *); 426cdfca03SJohn Marino char *fetch_getln(char *, int, struct fetch_connect *); 436cdfca03SJohn Marino int fetch_getline(struct fetch_connect *, char *, size_t, const char **); 446cdfca03SJohn Marino void fetch_set_ssl(struct fetch_connect *, void *); 456cdfca03SJohn Marino void *fetch_start_ssl(int, const char *); 46