PetscSSLInitializeContext — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscSSLInitializeContext

Set up an SSL context suitable for initiating HTTPS requests.

## Synopsis

    PetscErrorCode PetscSSLInitializeContext(SSL_CTX **octx)

## Output Parameter

- octx - the SSL_CTX to be passed to `PetscHTTPSConnect90`

If PETSc was ./configure -with-ssl-certificate requires the user have created a self-signed certificate with

        saws/CA.pl  -newcert  (using the passphrase of password)
        cat newkey.pem newcert.pem > sslclient.pem

and put the resulting file in either the current directory (with the application) or in the home directory. This seems kind of silly but it was all I could figure out.

## See Also

`PetscSSLDestroyContext()`, `PetscHTTPSConnect()`, `PetscHTTPSRequest()`

## Level

advanced

## Location

src/sys/webclient/client.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages