ZAP creates its own certificate first/always, if for whatever reason the
provided certificate is not loaded ZAP will still have a valid one.
You should be seeing a message like "Root CA certificate loaded from …"
or an error message, e.g. "Cannot read file …", after the messages you
quoted.
Are you not?
Note that ZAP does not expect its home to be shared between ZAP
instances. You should start ZAP with -cmd not -daemon to ensure that all
the options are saved to the configuration file and let the instance
started by zap-baseline.py have exclusive access to the home.
Best regards.
On 18/01/2023 13:23, Oleg Rybchenko wrote:
> Thanks for the answer!
>
> I've noticed that I can import my custom CA Certificate to ZAP with
> commandline param -certload
> So I tried this way:
>
> 1. Launch a container in interactive mode with my cert:
> docker run -v $(pwd):/zap/wrk/:rw --rm -u zap -p 8080:8080 -i
> owasp/zap2docker-stable zap.sh -daemon -host 0.0.0.0 -port 8080 -config
> api.disablekey=true *-certload path_to_cert.file* -config
> connection.proxyChain.enabled=true -config
> connection.proxyChain.hostName=proxy_address -config
> connection.proxyChain.port=1234
> 2. Then go into container with:
> docker exec -it {container} bash
> 3. Launch the scan I want:
> zap-baseline.py -t
https://site_with_proxy.com -g gen.conf -r
> testreport.html -n /zap/wrk/test.context -d
>
> But on 1st step ZAP didn't use my cert but created it's own:
> 5436 [ZAP-daemon] INFO org.zaproxy.addon.network.ExtensionNetwork -
> Creating new root CA certificate.
> 7566 [ZAP-daemon] INFO org.zaproxy.addon.network.ExtensionNetwork - New
> root CA certificate created.
>
> What am I doing wrong? =)
> среда, 18 января 2023 г. в 12:22:09 UTC+3,
psi...@gmail.com:
>
>> See:
>>
>> -
>>
https://www.zaproxy.org/docs/desktop/addons/network/options/connection/#http-proxy
>> -