> For the complete documentation index, see [llms.txt](https://ajuda.rnp.br/eduroam/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.rnp.br/eduroam/manual-do-administrador/procedimentos-complementares/configurando-um-certificado-valido.md).

# Configurando um certificado válido

### Configurando o servidor Freeradius com certificado válido&#xD;

Para configurar o servidor do eduroam na instituição para responder com um certificado válido é simples e não requer muitos passos de configuração.

É necessário ter um certificado válido Gerado pelo serviço [ICPEdu](https://ajuda.rnp.br/icpedu/) ou caso a instituição tenha convênio com outra certificadora.

### Como gero os arquivos do certificado válido para minha instituição?

Siga o manual do certificado corporativo [clicando aqui](https://ajuda.rnp.br/icpedu/cc/manual-do-usuario).

### Onde salvar os arquivos do certificado válido gerados?

Crie a pasta onde os arquivos da ICPEdu GlobalSign ficarão armazenados

```
mkdir /etc/freeradius/certs/icpedu
```

Entre na pasta

```
cd /etc/freeradius/certs/icpedu/
```

{% hint style="info" %}
Salvar todos os arquivos gerados (e.g. \*.crt, \*.pem, \*.key etc) na pasta padrão de certificados do Freeradius: ***/etc/freeradius/certs/icpedu***
{% endhint %}

Configurando arquivos necessários no Freeradius

{% hint style="warning" %}
O único arquivo que deve ser alterado para conter o caminho do certificado válido é o ***eap***
{% endhint %}

Localização do arquivo

```
cd /etc/freeradius/mods-available/
```

Editando o arquivo

```
vim /etc/freeradius/mods-available/eap
```

Alterando conteúdo para indicar o novo certificado (válido)

{% hint style="info" %}
Altere os campos indicados abaixo para suportar a validação do certificado
{% endhint %}

```
...
eap {
...
    tls-config tls-common {
        private_key_password = <SENHA_CERTIFICADO> # exemplo: Senha@EduroamCertificado36
        private_key_file = ${certdir}/icpedu/<CHAVE_CERTIFICADO> # exemplo: eduroam.ufjf.br.key
        certificate_file = ${certdir}/icpedu/<ARQUIVO_CERTIFICADO> # exemplo: eduroam.ufjf.br.crt
        ca_file = ${cadir}/icpedu/<CERTIFICADO_CA> # exemplo: icpedu.crt (Arquivo de certificado da CA ICPEdu GlobalSign)
    #   auto_chain = yes
        dh_file = ${certdir}/dh
    #   random_file = /dev/urandom
    #   fragment_size = 1024
    #   include_length = yes
    #   check_crl = yes
    #   check_all_crl = yes
        ca_path = ${cadir}
...
    }
}
```

{% hint style="info" %}
Os parâmetros acima normalmente não existem no arquivo final do EAP, porém, caso existam, favor comentar conforme a imagem.
{% endhint %}

Reinicie o serviço

```
service freeradius restart
```

Esqueça a rede Eduroam nos dispositivos dos clientes e teste a autenticação nos dispositivos.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ajuda.rnp.br/eduroam/manual-do-administrador/procedimentos-complementares/configurando-um-certificado-valido.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
