# 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
```none
saws/CA.pl  -newcert  (using the passphrase of password)
```
```none
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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/webclient/client.c.html#PetscSSLInitializeContext">src/sys/webclient/client.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/webclient/client.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
