]> granicus.if.org Git - pdns/commitdiff
Small changes to CERT
authorAki Tuomi <cmouse@desteem.org>
Tue, 21 May 2013 09:33:08 +0000 (12:33 +0300)
committerAki Tuomi <cmouse@desteem.org>
Thu, 23 May 2013 13:36:11 +0000 (16:36 +0300)
pdns/dnsrecords.cc

index d67259bb7a0a81301c2b4df39346b8ecf1c97b09..611def6f33fc5507d4ff788a6d7cfa56ac06735f 100644 (file)
@@ -192,11 +192,13 @@ boilerplate_conv(KEY, ns_t_key,
 
 boilerplate_conv(CERT, 37, 
                 conv.xfr16BitInt(d_type); 
+                 if (d_type == 0) throw MOADNSException("CERT type 0 is reserved");
+
                 conv.xfr16BitInt(d_tag); 
                 conv.xfr8BitInt(d_algorithm); 
-                conv.xfrBlob(d_certificate);
-                )
-                
+                 conv.xfrBlob(d_certificate);
+                 )
+
 boilerplate_conv(TLSA, 52, 
                 conv.xfr8BitInt(d_certusage); 
                 conv.xfr8BitInt(d_selector);