Found out myself, added basicConstraints = critical,CA:TRUE to config file used when generating CA root certificate and all is ok