Actual source code: petscwebclient.h

      1: /*
      2:   This is the include file for source code that accesses HTTPS
      3: */
      4: #pragma once

      6: /* MANSEC = Sys */

      8: /*  complex number I conflicts with SSL include files */
      9: #if !defined(PETSC_SKIP_COMPLEX)
     10:   #define PETSC_SKIP_COMPLEX
     11: #endif
     12: #include <petscsys.h>

     14: #include <errno.h>
     15: #include <sys/types.h>
     16: #include <sys/socket.h>
     17: #include <netinet/in.h>
     18: #include <netinet/tcp.h>
     19: #include <netdb.h>
     20: #include <fcntl.h>
     21: #include <signal.h>
     22: #include <unistd.h>
     23: #include <string.h>

     25: #include <openssl/ssl.h>
     26: #include <openssl/err.h>

     28: PETSC_EXTERN PetscErrorCode PetscSSLInitializeContext(SSL_CTX **);
     29: PETSC_EXTERN PetscErrorCode PetscSSLDestroyContext(SSL_CTX *);
     30: PETSC_EXTERN PetscErrorCode PetscHTTPSRequest(const char[], const char[], const char[], const char[], const char[], SSL *, char[], size_t);
     31: PETSC_EXTERN PetscErrorCode PetscHTTPSConnect(const char[], int, SSL_CTX *, int *, SSL **);

     33: PETSC_EXTERN PetscErrorCode PetscHTTPRequest(const char[], const char[], const char[], const char[], const char[], int, char[], size_t);