1 /* 2 This is the include file for source code that accesses HTTPS 3 */ 4 #ifndef PETSCWEBCLIENT_H 5 #define PETSCWEBCLIENT_H 6 7 /* complex number I conflicts with SSL include files */ 8 #if !defined(PETSC_SKIP_COMPLEX) 9 #define PETSC_SKIP_COMPLEX 10 #endif 11 #include <petscsys.h> 12 13 #include <errno.h> 14 #include <sys/types.h> 15 #include <sys/socket.h> 16 #include <netinet/in.h> 17 #include <netinet/tcp.h> 18 #include <netdb.h> 19 #include <fcntl.h> 20 #include <signal.h> 21 #include <unistd.h> 22 #include <string.h> 23 24 #include <openssl/ssl.h> 25 #include <openssl/err.h> 26 27 PETSC_EXTERN PetscErrorCode PetscSSLInitializeContext(SSL_CTX **); 28 PETSC_EXTERN PetscErrorCode PetscSSLDestroyContext(SSL_CTX *); 29 PETSC_EXTERN PetscErrorCode PetscHTTPSRequest(const char[], const char[], const char[], const char[], const char[], SSL *, char[], size_t); 30 PETSC_EXTERN PetscErrorCode PetscHTTPSConnect(const char[], int, SSL_CTX *, int *, SSL **); 31 32 PETSC_EXTERN PetscErrorCode PetscHTTPRequest(const char[], const char[], const char[], const char[], const char[], int, char[], size_t); 33 #endif 34