certnanny / sscep

SSCEP is a command line client for the SCEP protocol
Other
175 stars 92 forks source link

Error parsing IPv6 address without port #154

Open gotthardp opened 2 years ago

gotthardp commented 2 years ago

In version 0.9.0 this fails:

$ /opt/scepClient/bin/sscep getca -c ca.crt -u http://[:11]/cgi-bin/pkiclient.exe -v
/opt/scepClient/bin/sscep: starting sscep, version 0.9.0
/opt/scepClient/bin/sscep: new transaction
/opt/scepClient/bin/sscep: transaction id: SSCEP transactionId
/opt/scepClient/bin/sscep: hostname: 1000::11
/opt/scepClient/bin/sscep: directory: 1000::11  ← directory must be “cgi-bin/pkiclient.exe”

But this works:

$ /opt/scepClient/bin/sscep getca -c ca.crt -u http://[::1]:80/cgi-bin/pkiclient.exe -v
/opt/scepClient/bin/sscep: starting sscep, version 0.9.0
/opt/scepClient/bin/sscep: new transaction
/opt/scepClient/bin/sscep: transaction id: SSCEP transactionId
/opt/scepClient/bin/sscep: hostname: 1000::11
/opt/scepClient/bin/sscep: directory: cgi-bin/pkiclient.exe
/opt/scepClient/bin/sscep: port: 80
/opt/scepClient/bin/sscep: SCEP_OPERATION_GETCAPS
/opt/scepClient/bin/sscep: server response status code: 200, MIME header: text/plain
/opt/scepClient/bin/sscep: SCEP_OPERATION_GETCA
/opt/scepClient/bin/sscep: server response status code: 200, MIME header: application/x-x509-ca-ra-cert
/opt/scepClient/bin/sscep: valid response from server