Поправка.
На примере CA и CASub1Создаем Root CA.
[CA]$ openssl req -x509 -new -keyout private/cakey.pem -out cacert.pem
[CA]$ openssl x509 -in cacert.pem -noout -text
Issuer: C=..., CN=ca/...
Subject: C=..., CN=ca/...
X509v3 extensions:
X509v3 Subject Key Identifier:
46:73:83:89:B3:C3:01:15:0D:B6:DF:C4:80:31:91:DF:ED:06:6E:67
X509v3 Authority Key Identifier:
keyid:46:73:83:89:B3:C3:01:15:0D:B6:DF:C4:80:31:91:DF:ED:06:6E:67
X509v3 Basic Constraints:
CA:TRUE
Создаем CASub1.
[CASub1]$ openssl req -x509 -new -keyout private/cakey.pem -out cacert.pem
[CASub1]$ openssl x509 -in cacert.pem -noout -text
Issuer: C=..., CN=casub1/...
Subject: C=..., CN=casub1/...
X509v3 extensions:
X509v3 Subject Key Identifier:
4F:5D:3F:7A:24:62:97:2F:3E:CC:A4:04:D7:CD:C4:45:D2:6B:CD:54
X509v3 Authority Key Identifier:
keyid:4F:5D:3F:7A:24:62:97:2F:3E:CC:A4:04:D7:CD:C4:45:D2:6B:CD:54
X509v3 Basic Constraints:
CA:TRUE
Подписываем CASub1 в CA.
[CASub1]$ openssl x509 -x509toreq -in cacert.pem -signkey private/cakey.pem -out requests/casub1req.pem
[CA]$ openssl ca -extensions v3_ca -policy policy_anything -out certs/casub1.pem -in ../CASub1/requests/casub1req.pem
[CASub1]$ openssl x509 -in casub1.pem -noout -text
Issuer: C=..., CN=ca/...
Subject: C=..., CN=casub1/...
X509v3 extensions:
X509v3 Subject Key Identifier:
4F:5D:3F:7A:24:62:97:2F:3E:CC:A4:04:D7:CD:C4:45:D2:6B:CD:54
X509v3 Authority Key Identifier:
keyid:46:73:83:89:B3:C3:01:15:0D:B6:DF:C4:80:31:91:DF:ED:06:6E:67
X509v3 Basic Constraints:
CA:TRUE