File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ public X509Certificate2 X509Certificate2
117117 {
118118 get
119119 {
120- if ( _certificado != null )
121- if ( ! ConfiguracaoCertificado . ManterDadosEmCache )
122- _certificado . Reset ( ) ;
120+ if ( _certificado != null && ! DeveManterCertificadoEmCache ( ) )
121+ _certificado . Reset ( ) ;
122+
123123 _certificado = ObterCertificado ( ) ;
124124 return _certificado ;
125125 }
@@ -190,15 +190,20 @@ public void Dispose()
190190
191191 private void LimparCertificado ( )
192192 {
193- var deveManterCertificadoEmCache = _certificado == null ||
194- ConfiguracaoCertificado == null ||
195- ConfiguracaoCertificado . ManterDadosEmCache ;
196-
197- if ( deveManterCertificadoEmCache )
193+ if ( DeveManterCertificadoEmCache ( ) )
198194 return ;
199195
200196 _certificado . Reset ( ) ;
201197 _certificado = null ;
202198 }
199+
200+ private bool DeveManterCertificadoEmCache ( )
201+ {
202+ var deveManterCertificadoEmCache = _certificado == null ||
203+ ConfiguracaoCertificado == null ||
204+ ConfiguracaoCertificado . ManterDadosEmCache ;
205+
206+ return deveManterCertificadoEmCache ;
207+ }
203208 }
204209}
You can’t perform that action at this time.
0 commit comments