我正在尝试执行一个子进程,这在我的脚本中完成了几次。但在最后一个,它输出一个我无法找到解决方案的错误。 使用在命令行生成的相同文件的完全相同的命令工作正常。
sfmove = subprocess.call(["dnssec-signzone","-e",strftime("%Y%m%d%H", gmtime())+"0000","-p","-t","-g","-","K"+name+".ksk.key","-o",name,name+".external","K"+name+".zsk.key"])
# python3.4 makekeys.py
Enter the domain to configure keys for? test123.com
Generating key pair....................................................................+++ ................................................................................+++
K
Generating key pair...........................................................+++ .................................................................................+++
K
dnssec-signzone: fatal: No self-signed KSK DNSKEY found. Supply an active
key with the KSK flag set, or use '-P'.
dnssec-signzone -e20180330000000 -p -t -g -k Ktest123.com.ksk.key -o test123.com test123.com.external Ktest123.com.zsk.key
Verifying the zone using the following algorithms: RSASHA256.
Zone fully signed:
Algorithm: RSASHA256: KSKs: 1 active, 0 stand-by, 0 revoked
ZSKs: 1 active, 0 stand-by, 0 revoked
test123.com.external.signed
Signatures generated: 9
Signatures retained: 0
Signatures dropped: 0
Signatures successfully verified: 0
Signatures unsuccessfully verified: 0
Signing time in seconds: 0.010
Signatures per second: 875.401
Runtime in seconds: 0.013
如何通过Python正确执行dnssec-signzone?
url完成代码CODE