176 lines
4.7 KiB
C
176 lines
4.7 KiB
C
/*
|
|
******************************************************************************
|
|
* INTERPEAK SOURCE FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipssl.c,v $ $Revision: 1.18 $
|
|
* $Source: /home/interpeak/CVSRoot/ipssl2/src/ipssl.c,v $
|
|
* $Author: rboden $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* Copyright Interpeak AB 2000-2004 <www.interpeak.se>. All rights reserved.
|
|
* Design and implementation by Roger Boden <roger@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipssl_config.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <ipcom_type.h>
|
|
#include <ipcom_cstyle.h>
|
|
#include <ipcom_os.h>
|
|
#include <ipcom_sock.h>
|
|
#include <ipcom_err.h>
|
|
#include <ipcom_clib.h>
|
|
|
|
#include <ipssl.h>
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 EXTERN PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
void ssl_load_ciphers(void);
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 7 LOCAL PROTOTYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
IP_PUBLIC Ip_fd ipssl_get_stdio_fd(void);
|
|
IP_PUBLIC const char *ipssl_version(void);
|
|
IP_GLOBAL int SSL_library_init(void);
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 8 DATA
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 9 STATIC FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 10 GLOBAL FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
IP_GLOBAL int
|
|
SSL_library_init(void)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 11 PUBLIC FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipssl_create
|
|
*===========================================================================
|
|
*/
|
|
IP_PUBLIC Ip_err
|
|
ipssl_create()
|
|
{
|
|
ssl_load_ciphers();
|
|
return IPCOM_SUCCESS;
|
|
}
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipssl_get_stdio_fd
|
|
*===========================================================================
|
|
*/
|
|
IP_PUBLIC Ip_fd
|
|
ipssl_get_stdio_fd(void)
|
|
{
|
|
#if IPCOM_USE_SHELL == IPCOM_SHELL_IPCOM
|
|
Ipcom_proc *proc;
|
|
|
|
/* Find my shell socket. */
|
|
proc = ipcom_proc_self();
|
|
if(proc != IP_NULL)
|
|
return proc->shell_fd;
|
|
else
|
|
return IP_INVALID_SOCKET;
|
|
#endif
|
|
|
|
return ipcom_fileno(ip_stdin);
|
|
}
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipssl_start
|
|
*===========================================================================
|
|
*/
|
|
IP_PUBLIC Ip_err
|
|
ipssl_start(void)
|
|
{
|
|
return IPCOM_SUCCESS;
|
|
}
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipssl_version
|
|
*===========================================================================
|
|
* Description:
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_PUBLIC const char *
|
|
ipssl_version(void)
|
|
{
|
|
return "@(#) IPSSL $Name: VXWORKS_ITER40_2019102207 $ - INTERPEAK_COPYRIGHT_STRING";
|
|
}
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|
|
|