lib/index.js
function getFingerprintForURL(url) {
	var domain = getDomain(url);
	var found = global.requestSSLFingerprints[domain];
	debug('getFingerprintForURL %s -> %s=%s',url,domain,found);
	if (!found) {
		// try a wildcard search
		var u = urlib.parse(domain),
			tokens = (u && u.host || domain).split('.');
		domain = '*.'+tokens.splice(tokens.length > 1 ? 0 : 1).join('.');
		found = global.requestSSLFingerprints[domain];
		debug('getFingerprintForURL (wildcard) %s -> %s=%s',url,domain,found);
	}
	return found;
}
function getFingerprintForURL(url) {
	var domain = getDomain(url);
	var found = global.requestSSLFingerprints[domain];
	debug('getFingerprintForURL %s -> %s=%s',url,domain,found);
	if (!found) {
		// try a wildcard search
		var u = urlib.parse(domain),
			tokens = (u && u.host || domain).split('.');
		domain = '*.'+tokens.splice(tokens.length > 1 ? 0 : 1).join('.');
		found = global.requestSSLFingerprints[domain];
		debug('getFingerprintForURL (wildcard) %s -> %s=%s',url,domain,found);
	}
	return found;
}
function getFingerprintForURL ( url ) { var domain = getDomain ( url ) ; var found = global . requestSSLFingerprints [ domain ] ; debug ( 'getFingerprintForURL %s -> %s=%s' , url , domain , found ) ; if ( ! found ) { // try a wildcard search var u = urlib . parse ( domain ) , tokens = ( u && u . host || domain ) . split ( '.' ) ; domain = '*.' + tokens . splice ( tokens . length > 1 ? 0 : 1 ) . join ( '.' ) ; found = global . requestSSLFingerprints [ domain ] ; debug ( 'getFingerprintForURL (wildcard) %s -> %s=%s' , url , domain , found ) ; } return found ; }
lookup a fingerprint for a given URL by using the domain. returns null if
not found
lookup a fingerprint for a given URL by using the domain . returns null if not found