net-snmp support patch

This commit is contained in:
Juliusz Sosinowicz
2021-07-09 15:14:11 +02:00
parent 9aa528d19d
commit 8b4345734e
6 changed files with 79 additions and 9 deletions

View File

@ -793,6 +793,7 @@ AC_ARG_ENABLE([mcast],
# HAVE_POCO_LIB # HAVE_POCO_LIB
# WOLFSSL_MYSQL_COMPATIBLE # WOLFSSL_MYSQL_COMPATIBLE
# web server (--enable-webserver) HAVE_WEBSERVER # web server (--enable-webserver) HAVE_WEBSERVER
# net-snmp (--enable-net-snmp)
# Bind DNS compatibility Build # Bind DNS compatibility Build
@ -3123,6 +3124,13 @@ AS_IF([test "x$ENABLED_XTS" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"]) [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
# Web Server Build
AC_ARG_ENABLE([net-snmp],
[AS_HELP_STRING([--enable-net-snmp],[Enable net-snmp (default: disabled)])],
[ ENABLED_NETSNMP=$enableval ],
[ ENABLED_NETSNMP=no ]
)
# Web Server Build # Web Server Build
AC_ARG_ENABLE([webserver], AC_ARG_ENABLE([webserver],
[AS_HELP_STRING([--enable-webserver],[Enable Web Server (default: disabled)])], [AS_HELP_STRING([--enable-webserver],[Enable Web Server (default: disabled)])],
@ -4384,6 +4392,32 @@ then
fi fi
if test "$ENABLED_NETSNMP" = "yes"
then
if test "x$ENABLED_OPENSSLEXTRA" = "xno"
then
ENABLED_OPENSSLEXTRA="yes"
AM_CFLAGS="-DOPENSSL_EXTRA $AM_CFLAGS"
fi
if test "x$ENABLED_DES3" = "xno"
then
ENABLED_DES3="yes"
fi
if test "x$ENABLED_AESCFB" = "xno"
then
ENABLED_AESCFB="yes"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_CFB"
fi
if test "x$ENABLED_DTLS" = "xno"
then
ENABLED_DTLS="yes"
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DTLS"
fi
fi
if test "$ENABLED_SIGNAL" = "yes" if test "$ENABLED_SIGNAL" = "yes"
then then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SIGNAL -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT" AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SIGNAL -DWOLFSSL_AES_COUNTER -DWOLFSSL_AES_DIRECT"

View File

@ -0,0 +1,39 @@
/* compat_types.h
*
* Copyright (C) 2006-2021 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
/*
* Move types that cause cyclical dependency errors here.
*/
#ifndef WOLFSSL_OPENSSL_COMPAT_TYPES_H_
#define WOLFSSL_OPENSSL_COMPAT_TYPES_H_
#include <wolfssl/wolfcrypt/hmac.h>
#include <wolfssl/wolfcrypt/types.h>
typedef struct WOLFSSL_HMAC_CTX {
Hmac hmac;
int type;
word32 save_ipad[WC_HMAC_BLOCK_SIZE / sizeof(word32)]; /* same block size all*/
word32 save_opad[WC_HMAC_BLOCK_SIZE / sizeof(word32)];
} WOLFSSL_HMAC_CTX;
#endif /* WOLFSSL_OPENSSL_COMPAT_TYPES_H_ */

View File

@ -764,6 +764,9 @@ typedef WOLFSSL_ASN1_PCTX ASN1_PCTX;
#define EVP_aes_128_cfb128 wolfSSL_EVP_aes_128_cfb128 #define EVP_aes_128_cfb128 wolfSSL_EVP_aes_128_cfb128
#define EVP_aes_192_cfb128 wolfSSL_EVP_aes_192_cfb128 #define EVP_aes_192_cfb128 wolfSSL_EVP_aes_192_cfb128
#define EVP_aes_256_cfb128 wolfSSL_EVP_aes_256_cfb128 #define EVP_aes_256_cfb128 wolfSSL_EVP_aes_256_cfb128
#define EVP_aes_128_cfb wolfSSL_EVP_aes_128_cfb128
#define EVP_aes_192_cfb wolfSSL_EVP_aes_192_cfb128
#define EVP_aes_256_cfb wolfSSL_EVP_aes_256_cfb128
#define EVP_aes_128_ofb wolfSSL_EVP_aes_128_ofb #define EVP_aes_128_ofb wolfSSL_EVP_aes_128_ofb
#define EVP_aes_192_ofb wolfSSL_EVP_aes_192_ofb #define EVP_aes_192_ofb wolfSSL_EVP_aes_192_ofb
#define EVP_aes_256_ofb wolfSSL_EVP_aes_256_ofb #define EVP_aes_256_ofb wolfSSL_EVP_aes_256_ofb

View File

@ -35,15 +35,7 @@
#include "prefix_hmac.h" #include "prefix_hmac.h"
#endif #endif
#include <wolfssl/wolfcrypt/hmac.h> #include <wolfssl/openssl/compat_types.h>
typedef struct WOLFSSL_HMAC_CTX {
Hmac hmac;
int type;
word32 save_ipad[WC_HMAC_BLOCK_SIZE / sizeof(word32)]; /* same block size all*/
word32 save_opad[WC_HMAC_BLOCK_SIZE / sizeof(word32)];
} WOLFSSL_HMAC_CTX;
#include <wolfssl/openssl/evp.h> #include <wolfssl/openssl/evp.h>
#include <wolfssl/openssl/opensslv.h> #include <wolfssl/openssl/opensslv.h>

View File

@ -10,6 +10,7 @@ nobase_include_HEADERS+= \
wolfssl/openssl/buffer.h \ wolfssl/openssl/buffer.h \
wolfssl/openssl/cmac.h \ wolfssl/openssl/cmac.h \
wolfssl/openssl/cms.h \ wolfssl/openssl/cms.h \
wolfssl/openssl/compat_types.h \
wolfssl/openssl/conf.h \ wolfssl/openssl/conf.h \
wolfssl/openssl/crypto.h \ wolfssl/openssl/crypto.h \
wolfssl/openssl/des.h \ wolfssl/openssl/des.h \

View File

@ -87,6 +87,7 @@
#endif #endif
#elif (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)) #elif (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
#include <wolfssl/openssl/compat_types.h>
#include <wolfssl/openssl/bn.h> #include <wolfssl/openssl/bn.h>
#include <wolfssl/openssl/hmac.h> #include <wolfssl/openssl/hmac.h>