FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
SOS "Error en el soporte del canal seguro"
Hola a todos,
He revisado todos los posts y he probado a cargar un certificado válido con CAPICOM en el OnBeforePost del HTTPRIO pero me sige dando el error, por favro si alguien se le ocurre algo...Gracias! procedure TfrmMain.HTTPReqResp1BeforePost(const HTTPReqResp: THTTPReqResp; Data: Pointer); var FCertificatesList: TInterfaceList; i, j: Integer; Store: ICertificates; Certificate: ICertificate2; ExtProperty: IExtendedProperty; PCertContext : PCCERT_CONTEXT; CertContext : ICertContext; stAux: String; CertsUtils: TUtilities; begin inherited; FCertificatesList := TInterfaceList.Create(); //CAPICOM_LOCAL_MACHINE_STORE Store1.Open(CAPICOM_CURRENT_USER_STORE, 'My', CAPICOM_STORE_OPEN_READ_ONLY); //CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED or CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED or CAPICOM_STORE_OPEN_EXISTING_ONLY Store := Store1.Certificates; try CertsUtils := TUtilities.Create(Self); for I := 1 to Store1.Certificates.Count do begin Certificate := IInterface(Store.Item[i]) as ICertificate2; Certificate.GetInfo(CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME); // dtcCerts.Values[i-1, 1] := Certificate.GetInfo(CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME); // dtcCerts.Values[i-1, 2] := Certificate.ValidToDate; stAux := ''; for j := 1 to Certificate.ExtendedProperties.Count do begin ExtProperty := IInterface(Certificate.ExtendedProperties.Item[j]) as IExtendedProperty; if ExtProperty.PropID = CAPICOM_PROPID_FRIENDLY_NAME then begin stAux := CertsUtils.BinaryStringToByteArray(ExtProperty.Value[CAPICOM_ENCODE_BINARY]); break; end; end; stAux := Certificate.SerialNumber; // Cargo certificado válido if Certificate.SerialNumber = '2C2DBEE53ACFD8965809C4707F55FE28' then begin CertContext:= Certificate as ICertContext; CertContext.Get_CertContext(Integer(PCertContext)); // Por aquí pasa y no devuelve error pero aún así... if InternetSetOption(Data, INTERNET_OPTION_CLIENT_CERT_CONTEXT, PCertContext, Sizeof(CERT_CONTEXT))= False then ShowMessage('Error en InternetSetOption'); end; FCertificatesList.Add(Certificate); end; finally // dtcCerts.EndUpdate(); CertsUtils.Free(); end; |
#2
|
||||
|
||||
Cita:
__________________
Be water my friend. |
#3
|
|||
|
|||
Revisado pero...me sigue dando el mismo error
Hola, lo primero muchísimas gracias por la respuesta. No obstante, me tiene bastante mosqueado, he probado a cambiar números de serie y el error que devuelve es que hace falta un certificado válido, es decir, el context y el número de serie se informan bien (depurando está todo correctamente informado) pero por lo que sea sigue dando el mismo error, los certificados con los que he probado son de la FNMT y están operativos porque los uso en real, son los que uso para firma de Facturae...Estoy usando XE7 con Windows 8.1 ¿alguna idea?
Gracias de antemano. |
#4
|
|||
|
|||
Revisado pero...me sigue dando el mismo error
Hola, lo primero muchísimas gracias por la respuesta. No obstante, me tiene bastante mosqueado, he probado a cambiar números de serie y el error que devuelve es que hace falta un certificado válido, es decir, el context y el número de serie se informan bien (depurando está todo correctamente informado) pero por lo que sea sigue dando el mismo error, los certificados con los que he probado son de la FNMT y están operativos porque los uso en real, son los que uso para firma de Facturae...Estoy usando XE7 con Windows 8.1 ¿alguna idea?
Gracias de antemano. |
#5
|
|||
|
|||
Yo ademas de capicom tube que instalar el configurador de hacienda(Configurador_FNMT_RCM.exe)
|
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
TICKET BAI (TicketBAI); Nuevo sistema de la Agencia Tributaria del Pais Vasco | keys | Internet | 4170 | Hace 1 Semana 17:29:05 |
AEAT envio de datos vía Webservice problemas con WSDL | CelsoO | Internet | 11 | 09-10-2019 20:03:41 |
webService Soap de la Administración Digital Española notific@ | apicito | Internet | 3 | 31-01-2017 11:25:28 |
Error en Webservice funcion envio de sms | webmasterplc | Delphi para la web | 5 | 25-07-2013 20:10:29 |
Problemas con envío de XML a un WebService | davidvamo | Internet | 1 | 13-02-2007 15:49:20 |
|