X-Git-Url: https://git.svenne.dk/?p=public%2Fdnssec-swede-utility.git;a=blobdiff_plain;f=swede;fp=swede;h=10325c3fd9649491b22dce978f79e121e5da329c;hp=cc2b21da04582ec839b9439a41c1f42faab50a40;hb=e502dc23f12f2d5f34524f3bb3ab59c5731d9123;hpb=56e0811206c4972570718b8ef6f4bd6a5b4fd691 diff --git a/swede b/swede index cc2b21d..10325c3 100755 --- a/swede +++ b/swede @@ -611,6 +611,13 @@ if __name__ == '__main__': else: print genTLSA(args.host, args.protocol, args.port, cert, args.output, args.usage, args.selector, args.mtype) + # Clear the cert from memory (to stop M2Crypto from segfaulting) + # And cleanup the connection and context + cert=None + connection.clear() + connection.close() + ctx.close() + else: # Pass the path to the certificate to the genTLSA function if args.output == 'both': print genTLSA(args.host, args.protocol, args.port, args.certificate, 'draft', args.usage, args.selector, args.mtype)