# Использование SSL

По умолчанию, обмен данными между сервером PassOffice и клиентами PassOffice осуществляется по протоколу [HTTP](https://ru.wikipedia.org/wiki/HTTP).

Для поддержки шифрования [TLS/SSL](https://ru.wikipedia.org/wiki/TLS) и использования защищенного [HTTPS](https://ru.wikipedia.org/wiki/HTTPS) протокола в PassOffice необходимо получить у вашего администратора сертификат в формате [PKS12](https://ru.wikipedia.org/wiki/PKCS12) или сгенерируйте свой.

Описание процесса получения или генерации сертификата выходит за рамки данной статьи.

Полученный сертификат необходимо добавить в PassOffice. В зависимости от [способа установки](/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/sposoby-ustanovki.md) алгоритм добавление сертификата может отличаться.

## Использование HTTPS для Windows установки

1. Поместите полученный сертификат (например, `your_cert.p12`) в папку `[PassOffice]/bin/config/certs`.
2. В конфигурационном файле `[PassOffice]/bin/config/application.properties` укажите следующие параметры для использование SSL.

```properties
# PassOffice Server SSL Settings
server.ssl.enabled=true
server.ssl.key-store=config/certs/custom_cert.p12
server.ssl.key-store-password=your_password
server.ssl.key-store-type=PKS12
server.ssl.key-alias=your_alias
```

4. В конфигурационном файле `[PassOffics]/bin/config/application.properties` укажите порт, на котором будет работать сервер PassOffice с поддержкой HTTPS (например, 443).

```properties
# PassOffice Server Application Settings
server.port=443
```

5. Перезапустите сервер PassOffice.
6. Убедитесь, что сервер PassOffice доступен через веб-браузер по адресу `https://`*`your-hostname`* и защищен вашим SSL сертификатом.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aamsystems.ru/passoffice/passoffice-guide/admin-guide-doc/ustanovka-passoffice/ispolzovanie-ssl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
