Parcourir la source

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

Mukund Sivaraman il y a 12 ans
Parent
commit
8ee676bcec
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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;
     vector<uint8_t> keydata;
     decodeBase64(keydatastr, 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) {
     if (algorithm == 1 && keydata.size() < 3) {
         isc_throw(InvalidRdataLength, "DNSKEY keydata too short");
         isc_throw(InvalidRdataLength, "DNSKEY keydata too short");
     }
     }