[457] | 1 | /* stack.h
|
---|
| 2 | *
|
---|
| 3 | * Copyright (C) 2006-2020 wolfSSL Inc.
|
---|
| 4 | *
|
---|
| 5 | * This file is part of wolfSSL.
|
---|
| 6 | *
|
---|
| 7 | * wolfSSL is free software; you can redistribute it and/or modify
|
---|
| 8 | * it under the terms of the GNU General Public License as published by
|
---|
| 9 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 10 | * (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * wolfSSL is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public License
|
---|
| 18 | * along with this program; if not, write to the Free Software
|
---|
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
---|
| 20 | */
|
---|
| 21 |
|
---|
| 22 | /* stack.h for openSSL */
|
---|
| 23 |
|
---|
| 24 | #ifndef WOLFSSL_STACK_H_
|
---|
| 25 | #define WOLFSSL_STACK_H_
|
---|
| 26 |
|
---|
| 27 | #ifdef __cplusplus
|
---|
| 28 | extern "C" {
|
---|
| 29 | #endif
|
---|
| 30 |
|
---|
| 31 | typedef void (*wolfSSL_sk_freefunc)(void *);
|
---|
| 32 |
|
---|
| 33 | WOLFSSL_API void wolfSSL_sk_GENERIC_pop_free(WOLFSSL_STACK* sk, wolfSSL_sk_freefunc);
|
---|
| 34 | WOLFSSL_API void wolfSSL_sk_GENERIC_free(WOLFSSL_STACK *);
|
---|
| 35 | WOLFSSL_API int wolfSSL_sk_GENERIC_push(WOLFSSL_STACK *sk, void *data);
|
---|
| 36 | WOLFSSL_API void wolfSSL_sk_pop_free(WOLFSSL_STACK *st, void (*func) (void *));
|
---|
| 37 | WOLFSSL_API void wolfSSL_sk_CONF_VALUE_free(WOLF_STACK_OF(WOLFSSL_CONF_VALUE)* sk);
|
---|
| 38 | WOLFSSL_API WOLFSSL_STACK *wolfSSL_sk_new_null(void);
|
---|
| 39 |
|
---|
| 40 | WOLFSSL_API int wolfSSL_sk_CIPHER_push(WOLFSSL_STACK *st,WOLFSSL_CIPHER *cipher);
|
---|
| 41 | WOLFSSL_API WOLFSSL_CIPHER* wolfSSL_sk_CIPHER_pop(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk);
|
---|
| 42 | WOLFSSL_API WOLFSSL_STACK* wolfSSL_sk_new_cipher(void);
|
---|
| 43 |
|
---|
| 44 | #define OPENSSL_sk_free wolfSSL_sk_free
|
---|
| 45 | #define OPENSSL_sk_pop_free wolfSSL_sk_pop_free
|
---|
| 46 | #define OPENSSL_sk_new_null wolfSSL_sk_new_null
|
---|
| 47 | #define OPENSSL_sk_push wolfSSL_sk_push
|
---|
| 48 |
|
---|
| 49 | /* provides older OpenSSL API compatibility */
|
---|
| 50 | #define sk_free OPENSSL_sk_free
|
---|
| 51 | #define sk_pop_free OPENSSL_sk_pop_free
|
---|
| 52 | #define sk_new_null OPENSSL_sk_new_null
|
---|
| 53 | #define sk_push OPENSSL_sk_push
|
---|
| 54 |
|
---|
| 55 | #ifdef __cplusplus
|
---|
| 56 | }
|
---|
| 57 | #endif
|
---|
| 58 |
|
---|
| 59 | #endif
|
---|