gnunet-android

GNUnet for Android
Log | Files | Refs | README

stack.h (2077B)


      1 /* stack.h
      2  *
      3  * Copyright (C) 2006-2025 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 3 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 #include <wolfssl/openssl/compat_types.h>
     28 #include <wolfssl/openssl/ssl.h>
     29 
     30 #ifdef __cplusplus
     31     extern "C" {
     32 #endif
     33 
     34 typedef void (*wolfSSL_sk_freefunc)(void *);
     35 
     36 WOLFSSL_API void wolfSSL_sk_GENERIC_pop_free(WOLFSSL_STACK* sk, wolfSSL_sk_freefunc f);
     37 WOLFSSL_API void wolfSSL_sk_GENERIC_free(WOLFSSL_STACK *sk);
     38 WOLFSSL_API int wolfSSL_sk_GENERIC_push(WOLFSSL_STACK *sk, void *data);
     39 WOLFSSL_API void wolfSSL_sk_pop_free(WOLFSSL_STACK *st, void (*func) (void *));
     40 WOLFSSL_API WOLFSSL_STACK *wolfSSL_sk_new_null(void);
     41 
     42 WOLFSSL_API int wolfSSL_sk_CIPHER_push(WOLFSSL_STACK *st,WOLFSSL_CIPHER *cipher);
     43 WOLFSSL_API WOLFSSL_CIPHER* wolfSSL_sk_CIPHER_pop(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk);
     44 WOLFSSL_API WOLFSSL_STACK* wolfSSL_sk_new_cipher(void);
     45 
     46 #define OPENSSL_sk_free       wolfSSL_sk_free
     47 #define OPENSSL_sk_pop_free   wolfSSL_sk_pop_free
     48 #define OPENSSL_sk_new_null   wolfSSL_sk_new_null
     49 #define OPENSSL_sk_push       wolfSSL_sk_push
     50 
     51 /* provides older OpenSSL API compatibility  */
     52 #define sk_free         OPENSSL_sk_free
     53 #define sk_pop_free     OPENSSL_sk_pop_free
     54 #define sk_new_null     OPENSSL_sk_new_null
     55 #define sk_push         OPENSSL_sk_push
     56 
     57 #ifdef  __cplusplus
     58 }
     59 #endif
     60 
     61 #endif