Commit f4d654d2 authored by Rich Salz's avatar Rich Salz Committed by Rich Salz
Browse files

Remove err and prime demo's



ERR is not really a public facility; remove the demo.
prime shows how to generate a prime.  See apps.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 31384753
Loading
Loading
Loading
Loading

demos/err/Makefile

deleted100644 → 0
+0 −17
Original line number Diff line number Diff line
# Minimal makefile to generate error codes and link a test app
SRC= main.c
OBJ= main.o
HEADER=test_err.h
ERROBJ= test_err.o
CC=gcc
CFLAGS=-I../../include
LDFLAGS=-L../.. -lcrypto

PERL=perl

testapp: $(OBJ) $(ERROBJ) $(HEADER)
	$(CC) -o testapp $(OBJ) $(ERROBJ) $(LDFLAGS)
	
errors:
	$(PERL) ../../util/mkerr.pl -conf test_err.ec \
		-nostatic -write $(SRC)

demos/err/README

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line

This directory contains a simple example of how to use the ERR functions of
OpenSSL to add error codes to an external application. 

To test it first do "make errors". This will build error codes and add them
to the header files. It will also create some functions to load error codes.
Notice how "test_err.h" is updated after this call and the C source file
"test_err.c" is created. These names are in the test_err.ec file passed to the
mkerr.pl script.

Then do "make" which will build the test application.

demos/err/main.c

deleted100644 → 0
+0 −19
Original line number Diff line number Diff line
#include <openssl/err.h>

#include "test_err.h"

/* Simple error test routine */

void a_test_function(void)
{
    TESTerr(TEST_F_A_TEST_FUNCTION, TEST_R_TEST_REASON_CODE);
    TESTerr(TEST_F_A_TEST_FUNCTION, TEST_R_ANOTHER_TEST_REASON_CODE);
    ERR_add_error_data(1, "some additional error data");
}

int main(int argc, char **argv)
{
    ERR_load_TEST_strings();
    a_test_function();
    ERR_print_errors_fp(stderr);
}

demos/err/test_err.ec

deleted100644 → 0
+0 −3
Original line number Diff line number Diff line
# Details: name of library, header file to use and
# file to output error codes to.
L       TEST    test_err.h test_err.c

demos/err/test_err.h

deleted100644 → 0
+0 −25
Original line number Diff line number Diff line
/* Demo of use of error library */

#ifndef TEST_ERR_H
# define TEST_ERR_H

#ifdef  __cplusplus
extern "C" {
#endif

/* Test library name */

# define TEST_LIB_NAME   "demo test library routines"

/* Normal header details go here */

/*
 * Prototypes are picked up by the error script to generate strings for
 * function names.
 */

void a_test_function(void);

/*
 * Everything after this point is auto generated when you do "make errors"
 */
Loading