Browse Source

[2387] Point to the RFC about why key data has to be at least 3 bytes long

Mukund Sivaraman 12 years ago
parent
commit
8ee676bcec
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/dns/rdata/generic/dnskey_48.cc

+ 2 - 0
src/lib/dns/rdata/generic/dnskey_48.cc

@@ -168,6 +168,8 @@ DNSKEY::constructFromLexer(MasterLexer& lexer) {
     vector<uint8_t> keydata;
     decodeBase64(keydatastr, keydata);
 
+    // See RFC 4034 appendix B.1 for why the key data has to be at least
+    // 3 bytes long with RSA/MD5.
     if (algorithm == 1 && keydata.size() < 3) {
         isc_throw(InvalidRdataLength, "DNSKEY keydata too short");
     }