public static void
signMessage(Message message, KEYRecord key, PrivateKey privkey,
	    SIGRecord previous) throws DNSSEC.DNSSECException
{
	
	int validity = Options.intValue("sig0validity");
	if (validity < 0)
		validity = VALIDITY;

	long now = System.currentTimeMillis();
	Date timeSigned = new Date(now);
	Date timeExpires = new Date(now + validity * 1000);

	SIGRecord sig =  DNSSEC.signMessage(message, previous, key, privkey,
					    timeSigned, timeExpires);
	
	message.addRecord(sig, Section.ADDITIONAL);
}
Sign a message with SIG(0). The DNS key and private key must refer to the
same underlying cryptographic key.
@param message The message to be signed
@param key The DNSKEY record to use as part of signing
@param privkey The PrivateKey to use when signing
@param previous If this message is a response, the SIG(0) from the query
src/main/java/core/org/xbill/DNS/SIG0.java