|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbadpenguin.dkim.NSKeyStore
public class NSKeyStore
The NSKeyStore can be used to retrieve keys from a Naming Service (Currently
only DNS) and store them in a hash table. Any subsequent requests for the same
domain key record are returned directly from the hash table, thus reducing the
number of DNS queries performed during verification.
Each key is given an expiry time, and once the expiry time has passed, a new
name resolution will be made.
Constructor Summary | |
---|---|
NSKeyStore(java.lang.String type,
java.lang.String nameServer)
Create a new KeyStore object. |
Method Summary | |
---|---|
int |
getCacheTime()
Get the current cache time for the DKIM keys. |
int |
getKeyLimit()
The KeyStore limits the number of keys it stores, to prevent someone adding 1000 key records and causing a DOS attack. |
NSKey[] |
retrieveKeys(java.lang.String lookup)
This method returns a NSKey object for the give domain key record. |
void |
setCacheTime(int cacheTime)
Set the amount of time in seconds, that keys should be kept in cache. |
void |
setKeyLimit(int keyLimit)
The KeyStore limits the number of keys it stores, to prevent someone adding 1000 key records and causing a DOS attack. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NSKeyStore(java.lang.String type, java.lang.String nameServer) throws javax.naming.NamingException
type
- nameServer
-
javax.naming.NamingException
Method Detail |
---|
public NSKey[] retrieveKeys(java.lang.String lookup) throws DkimException
lookup
- - The domain key record to retrieve
DkimException
- - The NameService lookup has failed.public int getKeyLimit()
public void setKeyLimit(int keyLimit)
keyLimit
- Key Limitpublic void setCacheTime(int cacheTime)
cacheTime
- public int getCacheTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |