Ver Mensaje Individual
  #1320  
Antiguo 29-05-2017
seccion_31 seccion_31 is offline
Miembro
 
Registrado: ene 2017
Posts: 112
Reputación: 8
seccion_31 Va por buen camino
al final lo de enviar mas de 12 facturas se soluciono:

Código:
procedure TfEmitidas.emitidasHTTPWebNode1BeforePost(
  const HTTPReqResp: THTTPReqResp; Data: Pointer);
var
     Store : IStore;
     Certs : ICertificates;
     Cert : ICertificate2;
     CertContext : ICertContext;
     PCertContext : PCCERT_CONTEXT;
     V : OleVariant;
 const
     INTERNET_OPTION_CLIENT_CERT_CONTEXT = 84;
 begin

     V:=comboBox1.Text;

     Store := CoStore.Create;
     Store.Open(CAPICOM_CURRENT_USER_STORE, 'MY',CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED );
     Certs:=Store.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME,V,False ); { Buscar certificado por nombre }
     if Certs.Count > 0 then
     begin
         Cert:=IInterface(Certs.Item[1]) as ICertificate2;
         CertContext:=Cert as ICertContext;
         CertContext.Get_CertContext(Integer(PCertContext));
         if InternetSetOption(Data,INTERNET_OPTION_CLIENT_CERT_CONTEXT,PCertContext,Sizeof(CERT_CONTEXT)) = False then
         begin
             ShowMessage( 'Internet SSL certificate. Something went wrong' );
         end;
     end;
 end;
(en comboBox1 tengo el nombre del certificado)
Responder Con Cita