On Fri, Jul 16, 2021 at 04:50:30PM +0300, Vitaly Chikunov wrote: > Mimi, > > On Wed, Jul 14, 2021 at 12:16:57PM -0400, Mimi Zohar wrote: > > On Mon, 2021-07-12 at 08:44 +0300, Vitaly Chikunov wrote: > > > > > > @@ -43,26 +43,43 @@ cat > test-ca.conf <<- EOF > > > basicConstraints=CA:TRUE > > > subjectKeyIdentifier=hash > > > authorityKeyIdentifier=keyid:always,issuer > > > + > > > + [ skid ] > > > + basicConstraints=CA:TRUE > > > + subjectKeyIdentifier=12345678 > > > + authorityKeyIdentifier=keyid:always,issuer > > > EOF > > > fi > > > > On my system: > > $ openssl version > > OpenSSL 1.1.1g FIPS 21 Apr 2020 > > > > Not sure this has anything to do with the reason that "skid" is not > > supported. The resulting files are empty. > > > > ls -lat *skid* > > -rw-rw-r--. 1 mimi mimi 0 Jul 14 12:02 test-rsa1024_skid.key > > -rw-rw-r--. 1 mimi mimi 0 Jul 14 12:02 test-rsa1024_skid.pub > > > > - openssl pkey -in test-rsa1024.key -out test-rsa1024.pub -pubout > > - openssl req -verbose -new -nodes -utf8 -sha1 -days 10000 -batch -x509 > > -extensions skid -config test-ca.conf -newkey rsa:1024 -out test- > > rsa1024_skid.cer -outform DER -keyout test-rsa1024_skid.key > > Using configuration from test-ca.conf > > Error Loading extension section skid <=== > > How `test-ca.conf' looked like? Maybe it's not updated? > Try to run ./gen-keys.sh clean (which is called from make distclean). Perhaps, this is the case. I will add `test -nt' check in gen-keys.sh, so that test-ca.conf and keys are regenerated when gen-keys.sh is updated. This should solve that problem for users. diff --git a/tests/gen-keys.sh b/tests/gen-keys.sh index d604c96..d2c2f80 100755 --- a/tests/gen-keys.sh +++ b/tests/gen-keys.sh @@ -26,7 +26,8 @@ log() { if [ "$1" = clean ]; then rm -f test-ca.conf -elif [ "$1" = force ] || [ ! -e test-ca.conf ]; then +elif [ "$1" = force ] || [ ! -e test-ca.conf ] \ + || [ gen-keys.sh -nt test-ca.conf ]; then cat > test-ca.conf <<- EOF [ req ] distinguished_name = req_distinguished_name @@ -54,7 +55,8 @@ fi # RSA # Second key will be used for wrong key tests. for m in 1024 1024_skid 2048; do - if [ "$1" = clean ] || [ "$1" = force ]; then + if [ "$1" = clean ] || [ "$1" = force ] \ + || [ gen-keys.sh -nt test-rsa$m.key ]; then rm -f test-rsa$m.cer test-rsa$m.key test-rsa$m.pub fi if [ "$1" = clean ]; then Thanks,