Added skel for SMTP test function;

master
Alexander Vdolainen 4 years ago
parent b6dfd3a522
commit 5afed34d62

1
src/.gitignore vendored

@ -1,3 +1,4 @@
ejabberdauth
.deps
testimap
testsmtp

@ -10,7 +10,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = -Wall -g
if BUILD_TESTS
bin_PROGRAMS = ejabberdauth testimap
bin_PROGRAMS = ejabberdauth testimap testsmtp
else
bin_PROGRAMS = ejabberdauth
endif
@ -20,8 +20,12 @@ ejabberdauth_SOURCES = main.c eport.c tls.c imap.c smtp.c
ejabberdauth_LDADD = $(LIBS) $(OPENSSL_LIBS)
if BUILD_TESTS
testimap_SOURCES = tls.c imap.c tests/testimap.c tests/misc.c
testimap_SOURCES = tls.c imap.c tests/misc.c tests/testimap.c
testimap_LDADD = $(LIBS) $(OPENSSL_LIBS)
testsmtp_SOURCES = tls.c smtp.c tests/misc.c tests/testsmtp.c
testsmtp_LDADD = $(LIBS) $(OPENSSL_LIBS)
endif

@ -1,2 +1,3 @@
testimap
.dirstamp
testsmtp

@ -0,0 +1,48 @@
/*
* ejabberd external authentication program
*
* (c) Alexander Vdolainen 2013, 2018, 2019, 2021 <alex@vapaa.xyz>
*
* this 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.
*
* this 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, see <http://www.gnu.org/licenses/>.";
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/select.h>
#include <errno.h>
#include <netdb.h>
#include <string.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <stdarg.h>
#include <getopt.h>
#include <ejabbermsg.h>
#include <tlsport.h>
#include <smtpf.h>
#define PRG_NAME "ejabberauth smtp function test"
int main(int argc, char **argv)
{
return 0;
}
Loading…
Cancel
Save