Rest 2.0 com certificado ssl

Bom dia Pessoal,

Estou enfrentando um problema ao consumir uma api REST 2.0 com certificado ssl...

Gerei o certificado usando o totvs_certificate.exe que a totvs disponibliza, fiz os procedimentos de configuração de ini, e até ai tudo certo...

Consigo subir o serviço e tambem consigo acessar a pagina da web onde consigo ver as API´s disponíveis...

Meu problema está quando tento consumir a API está me retornando o seguinte erro:

[SSL_read, alocated: 16384] error=336151574 msg=[error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown]

Como se o certificado fosse desconhecido.

Alguem ja passou por isso e consegue dar uma luz? kkk

Obrigado desde ja

Meu .ini está assim

[Web] SourcePath=D:\TOTVS12_PROD\Protheus_Prod\Protheus\apo\web\ RPOCustom=D:\TOTVS12_PROD\Protheus_Prod\Protheus\apo\web\custom.rpo RootPath=D:\TOTVS12_PROD\Protheus_Prod\Protheus_Data\ StartPath=\system\ x2_path= RpoDb=Top RpoLanguage=portuguese RpoVersion=120 LocalFiles=ctree Trace=0 localdbextension=.dtc PictFormat=DEFAULT DateFormat=DEFAULT RegionalLanguage=BRA theme=sunset TOPMemoMega=1

[DBAccess] DataBase=MSSQL Server=SV-PROTHEUS ALIAS=Protheus11 PROTHEUSONLY=0 PORT=7890 TopMemoMega=10 StartSysInDB=10

[Drivers] Active=TCP

[TCP] TYPE=TCPIP Port=1247

[General] InstallPath=D:\TOTVS12_PROD\Protheus_Prod\Protheus MAXSTRINGSIZE=10 BuildKillUsers=1

[LICENSESERVER] enable=0 port=5555 ShowStatus=1

[LICENSECLIENT] server=127.0.0.1 port=5555

[SERVICE] Name=09_Protheus_WEB_Prod DisplayName=09_Protheus_WEB_Prod

[MAIL] Protocol=POP3

[MAIL] AuthLOGIN=1 AuthNTLM=1 AuthPLAIN=1

[TDS] ALLOWAPPLYPATCH= ALLOWEDIT=

[ONSTART] JOBS=HTTPJOB REFRESHRATE=120

[HTTPJOB] MAIN=HTTP_START ENVIRONMENT=Web

[HTTPV11] Enable=1 Sockets=HTTPREST

[HTTPREST] Port=8089 IPsBind= Enable=1 URIs=HTTPURI Security=1 SSL2=1 SSL3=1 TLS1_0=0 TLS1_1=1 TLS1_2=1 TLS1_3=1 CERTIFICATE=D:\TOTVS12_PROD\Protheus_Prod\Protheus\bin\appserver_web\totvs_certificate.crt

KEY=D:\TOTVS12_PROD\Protheus_Prod\Protheus\bin\appserver_web\totvs_certificate_key.pem

[HTTPURI] URL=/ PrepareIn=01,0101 Instances=1,1 CORSEnable=1 AllowOrigin=*

1 curtida

Tive esse problema. Por aqui bastou iniciar a URL com https ao invés de http.

Conseguiu alguma solução? Aqui eu estou com o mesmo problema.

Encontraram alguma solução pra este tópico?

Tenho problemas semelhantes:

[VDRPORT] 250916_151944 4E6C VSS0302 E sslRead fatal error 1 [SSL_ERROR_SSL]
[VDRPORT] 250916_151944 4E6C VSS0789 E line=307 cmd=[SSL_read, alocated: 16384] error=167773208 msg=[error:0A000418:SSL routines::tlsv1 alert unknown ca]
[VDRPORT] 250916_151944 4E6C VSS0561 E onRecvConnected: processing error or EOF in SSL_read
[VDRPORT] 250916_151944 4E6C LPT0253 E ctx:600011 [@CONNECTED,APP_READY@] [VDR_LP] error 1 in server handshake

Mensagens do tipo “alert certificate unknown” ou “alert unknown ca” indicam que é necessário instalar o certificado do CA (Certification Authority) na máquina client.

Se estiver usando os certificados padrão da Totvs comece por aqui: Porta Multiprotocolo - Instalação de Certificado - TOTVSTEC - TDN