@@ -149,6 +149,7 @@ function SSLObservatory() {
149149
150150 //this.updateCertWhitelist();
151151 this . loadCertWhitelist ( ) ;
152+ this . saveCertWhitelist ( ) ;
152153
153154 this . log ( DBUG , "Loaded observatory component!" ) ;
154155}
@@ -545,7 +546,10 @@ SSLObservatory.prototype = {
545546 var file =
546547 CC [ "@mozilla.org/file/local;1" ]
547548 . createInstance ( CI . nsILocalFile ) ;
548- file . initWithPath ( this . HTTPSEverywhere . rw . chromeToPath ( loc ) ) ;
549+ var path = this . HTTPSEverywhere . rw . chromeToPath ( loc ) ;
550+ this . log ( WARN , "SAVING cert whitelist to " + path ) ;
551+ file . initWithPath ( path ) ;
552+ this . log ( WARN , "got " + file ) ;
549553 var data = this . HTTPSEverywhere . rw . write ( file , JSON . stringify ( this . whitelist ) ) ;
550554 } ,
551555
@@ -580,7 +584,7 @@ SSLObservatory.prototype = {
580584 that . log ( 4 , "Replacing chain whitelist..." ) ;
581585 that . whitelist = whitelist ;
582586 that . log ( 5 , "Got valid whitelist..." + JSON . stringify ( whitelist ) ) ;
583- that . saveCertWhitelist ( ) ;
587+ that . updateCertWhitelist ( ) ;
584588 } else {
585589 that . log ( 4 , "Unexpected response status " + req . status + " fetching chain whitelist" ) ;
586590 return false ;
0 commit comments