1 /***************************************************************************
2 begin : Mon Mar 01 2004
3 copyright : (C) 2019 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * Please see toplevel file COPYING for license details *
8 ***************************************************************************/
9
10 #ifdef HAVE_CONFIG_H
11 # include <config.h>
12 #endif
13
14
15 #include "r_pub_l.h"
16
17 #include "aqebics/aqebics_l.h"
18 #include "aqebics/msg/msg.h"
19 #include "aqebics/msg/keys.h"
20 #include "aqebics/msg/zip.h"
21 #include "aqebics/msg/xml.h"
22 #include "aqebics/client/user_l.h"
23
24 #include <gwenhywfar/base64.h>
25 #include <gwenhywfar/gui.h>
26 #include <gwenhywfar/httpsession.h>
27
28
29
EBC_Provider_XchgPubRequest(AB_PROVIDER * pro,GWEN_HTTP_SESSION * sess,AB_USER * u,const char * signVersion)30 int EBC_Provider_XchgPubRequest(AB_PROVIDER *pro,
31 GWEN_HTTP_SESSION *sess,
32 AB_USER *u,
33 const char *signVersion)
34 {
35 const char *s;
36
37 s=EBC_User_GetProtoVersion(u);
38 if (!(s && *s))
39 s="H002";
40 if (strcasecmp(s, "H002")==0)
41 return EBC_Provider_XchgPubRequest_H002(pro, sess, u, signVersion);
42 else if (strcasecmp(s, "H003")==0)
43 return EBC_Provider_XchgPubRequest_H003(pro, sess, u, signVersion);
44 else {
45 DBG_ERROR(AQEBICS_LOGDOMAIN, "Proto version [%s] not supported", s);
46 return GWEN_ERROR_INTERNAL;
47 }
48 }
49
50
51
52
53
54
55
56