• R/O
  • SSH
  • HTTPS

akdf: Commit


Commit MetaInfo

Revisão516 (tree)
Hora2020-10-13 23:16:22
Autorderekwildstar

Mensagem de Log

Ajuste em GetKeyContainerInfo
Alterada uma diretiva de compilação para incluir GetFileSizeEx também no Delphi 24

Mudança Sumário

Diff

--- trunk/rtp/src/Rtl/Win/KRK.Rtl.Win.WinCrypt.Utilities.pas (revision 515)
+++ trunk/rtp/src/Rtl/Win/KRK.Rtl.Win.WinCrypt.Utilities.pas (revision 516)
@@ -1610,21 +1610,17 @@
16101610 ACryptKeyProvInfo := nil;
16111611 CryptKeyProvInfoSize := 0;
16121612
1613- if not CertGetCertificateContextProperty(ACertificateContext
1614- ,CERT_KEY_PROV_INFO_PROP_ID
1615- ,nil
1616- ,@CryptKeyProvInfoSize) then
1617- raise EAdvApi.Create(GetLastError,'CertGetCertificateContextProperty@GetKeyContainerInfo: Não foi possível obter as informações do contêiner de chaves')
1618- else
1613+ if CertGetCertificateContextProperty(ACertificateContext
1614+ ,CERT_KEY_PROV_INFO_PROP_ID
1615+ ,nil
1616+ ,@CryptKeyProvInfoSize) then
16191617 begin
16201618 ACryptKeyProvInfo := AllocMem(CryptKeyProvInfoSize);
16211619
1622- if not CertGetCertificateContextProperty(ACertificateContext
1623- ,CERT_KEY_PROV_INFO_PROP_ID
1624- ,ACryptKeyProvInfo
1625- ,@CryptKeyProvInfoSize) then
1626- raise EAdvApi.Create(GetLastError,'CertGetCertificateContextProperty@GetKeyContainerInfo: Não foi possível realizar a assinatura')
1627- else
1620+ if CertGetCertificateContextProperty(ACertificateContext
1621+ ,CERT_KEY_PROV_INFO_PROP_ID
1622+ ,ACryptKeyProvInfo
1623+ ,@CryptKeyProvInfoSize) then
16281624 Result := True;
16291625 end;
16301626 end;
--- trunk/rtp/src/Rtl/Win/KRK.Rtl.Win.Windows.pas (revision 515)
+++ trunk/rtp/src/Rtl/Win/KRK.Rtl.Win.Windows.pas (revision 516)
@@ -49,7 +49,7 @@
4949 {$ENDIF}
5050 {$IFEND}
5151
52-{$IF RTLVersion < 30} // Delphi Seattle
52+{$IF RTLVersion < 32} // Delphi Tokyo
5353 function GetFileSizeEx(hFile: THandle; var lpFileSize: Int64): ByteBool; stdcall; external kernel32 name 'GetFileSizeEx';
5454 {$IFEND}
5555
Show on old repository browser