我正在Ubuntu 18.10上运行以下命令:
ls -la /home/user/tmp/
drwxr-xr-x 2 user user 4096 Jun 6 14:11 .
drwxr-xr-x 38 user user 4096 Jun 6 09:31 ..
-rw-rw-r-- 1 user user 3158 Jun 6 13:48 ca.crt
-rw-rw-r-- 1 user user 1952 Jun 6 13:49 server.crt
SERVER_CRT=/home/user/tmp/server.crt
CA_CRT=/home/user/tmp/ca.crt
openssl verify $SERVER_CRT -CAfile $CA_CRT
但得到:
...
error 20 at 0 depth lookup: unable to get local issuer certificate
error /home/user/tmp/server.crt: verification failed
Can't open -CAfile for reading, No such file or directory
139708683215936:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:72:fopen('-CAfile','r')
139708683215936:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:79:
unable to load certificate
...
error 18 at 0 depth lookup: self signed certificate
error /home/user/tmp/ca.crt: verification failed
但是这两个文件确实存在,为什么会出现no such file
错误?