Commit 44947608 authored by jfigus's avatar jfigus

This commit provides a minimal refactoring of the include hierarchy to allow...

This commit provides a minimal refactoring of the include hierarchy to allow eliminating the LIBSRTP_INTERNAL_BUILD hack added a couple of days ago.  This was tested with gcc, g++, and clang.  Also did a sanity build of the doubango and asterisk downstream projects.
parent 0db0033d
......@@ -42,7 +42,7 @@ endif
CC = @CC@
INCDIR = -Icrypto/include -I$(srcdir)/include -I$(srcdir)/crypto/include
DEFS = @DEFS@ -DLIBSRTP_INTERNAL_BUILD
DEFS = @DEFS@
CPPFLAGS= @CPPFLAGS@
CFLAGS = @CFLAGS@
LIBS = @LIBS@
......
......@@ -383,7 +383,7 @@ void
octet_string_set_to_zero(uint8_t *s, int len);
#if !defined(SRTP_KERNEL_LINUX) && defined(HAVE_CONFIG_H) && defined(LIBSRTP_INTERNAL_BUILD)
#if !defined(SRTP_KERNEL_LINUX) && defined(HAVE_CONFIG_H)
/*
* Convert big endian integers to CPU byte order.
......
......@@ -46,7 +46,8 @@
#ifndef ERR_H
#define ERR_H
#include "datatypes.h"
#include <stdio.h>
#include <stdarg.h>
/**
* @defgroup Error Error Codes
......
......@@ -75,7 +75,7 @@
#endif
/* Can we do 64 bit integers? */
#if !defined(HAVE_UINT64_T) && defined(LIBSRTP_INTERNAL_BUILD)
#if !defined(HAVE_UINT64_T)
# if SIZEOF_UNSIGNED_LONG == 8
typedef unsigned long uint64_t;
# elif SIZEOF_UNSIGNED_LONG_LONG == 8
......
......@@ -50,6 +50,7 @@
#include "err.h"
#ifdef OPENSSL
#include <openssl/evp.h>
#include <stdint.h>
typedef EVP_MD_CTX sha1_ctx_t;
......
......@@ -48,7 +48,9 @@
#endif
#include <stdio.h>
#include <string.h>
#include "sha1.h"
#include "datatypes.h"
#define SHA_PASS 0
#define SHA_FAIL 1
......
......@@ -50,9 +50,10 @@
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include "crypto_kernel.h"
#include "crypto.h"
#include "crypto_types.h"
#include "err.h"
/**
* @defgroup SRTP Secure RTP
......@@ -101,6 +102,7 @@ extern "C" {
#define AES_256_GCM_KEYSIZE_WSALT SRTP_AEAD_SALT_LEN + 32
/*
* nota bene: since libSRTP doesn't support the use of the MKI, the
* SRTP_MAX_TRAILER_LEN value is just the maximum tag length
......
......@@ -50,6 +50,12 @@
#include "rdbx.h"
#include "rdb.h"
#include "integers.h"
#include "crypto.h"
#include "cipher.h"
#include "auth.h"
#include "aes.h"
#include "key.h"
#include "crypto_kernel.h"
/*
* an srtp_hdr_t represents the srtp header
......
......@@ -85,6 +85,7 @@
#include "srtp.h"
#include "rtp.h"
#include "crypto_kernel.h"
#ifdef RTPW_USE_WINSOCK2
# define DICT_FILE "words.txt"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment