|
1 /** |
|
2 * XML Security Library (http://www.aleksey.com/xmlsec). |
|
3 * |
|
4 * "XML Key Management Specification v 2.0" implementation |
|
5 * http://www.w3.org/TR/xkms2/ |
|
6 * |
|
7 * This is free software; see Copyright file in the source |
|
8 * distribution for preciese wording. |
|
9 * |
|
10 * Copyright (C) 2002-2003 Aleksey Sanin <aleksey@aleksey.com> |
|
11 */ |
|
12 #ifndef __XMLSEC_PRIVATE_XKMS_H__ |
|
13 #define __XMLSEC_PRIVATE_XKMS_H__ |
|
14 #include "xmlsec_config.h" |
|
15 #ifndef XMLSEC_PRIVATE |
|
16 #error "xmlsec/private/xkms.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-<crypto> libraries" |
|
17 #endif /* XMLSEC_PRIVATE */ |
|
18 |
|
19 #ifndef XMLSEC_NO_XKMS |
|
20 |
|
21 #ifdef __cplusplus |
|
22 extern "C" { |
|
23 #endif /* __cplusplus */ |
|
24 #include <stdio.h> |
|
25 |
|
26 #include <libxml2_tree.h> |
|
27 #include <libxml2_parser.h> |
|
28 |
|
29 #include "xmlsec_xmlsec.h" |
|
30 #include "xmlsec_buffer.h" |
|
31 #include "xmlsec_list.h" |
|
32 #include "xmlsec_keys.h" |
|
33 #include "xmlsec_keysmngr.h" |
|
34 #include "xmlsec_keyinfo.h" |
|
35 #include "xmlsec_transforms.h" |
|
36 #include "xmlsec_xkms.h" |
|
37 |
|
38 /************************************************************************ |
|
39 * |
|
40 * XKMS RespondWith Klass |
|
41 * |
|
42 ************************************************************************/ |
|
43 typedef int (*xmlSecXkmsRespondWithNodeReadMethod) (xmlSecXkmsRespondWithId id, |
|
44 xmlSecXkmsServerCtxPtr ctx, |
|
45 xmlNodePtr node); |
|
46 typedef int (*xmlSecXkmsRespondWithNodeWriteMethod) (xmlSecXkmsRespondWithId id, |
|
47 xmlSecXkmsServerCtxPtr ctx, |
|
48 xmlNodePtr node); |
|
49 struct _xmlSecXkmsRespondWithKlass { |
|
50 const xmlChar* valueName; |
|
51 const xmlChar* valueNs; |
|
52 |
|
53 const xmlChar* nodeName; |
|
54 const xmlChar* nodeNs; |
|
55 |
|
56 xmlSecXkmsRespondWithNodeReadMethod readNode; |
|
57 xmlSecXkmsRespondWithNodeWriteMethod writeNode; |
|
58 |
|
59 void* reserved1; |
|
60 void* reserved2; |
|
61 }; |
|
62 |
|
63 #define xmlSecXkmsRespondWithKlassGetName(id) \ |
|
64 ((((id) != NULL) && ((id)->valueName != NULL)) ? (id)->valueName : NULL) |
|
65 |
|
66 /************************************************************************ |
|
67 * |
|
68 * XKMS ServerRequest Klass |
|
69 * |
|
70 ************************************************************************/ |
|
71 typedef int (*xmlSecXkmsServerRequestNodeReadMethod) |
|
72 (xmlSecXkmsServerRequestId id, |
|
73 xmlSecXkmsServerCtxPtr ctx, |
|
74 xmlNodePtr node); |
|
75 typedef int (*xmlSecXkmsServerRequestExecuteMethod) |
|
76 (xmlSecXkmsServerRequestId id, |
|
77 xmlSecXkmsServerCtxPtr ctx); |
|
78 typedef int (*xmlSecXkmsServerRequestNodeWriteMethod) |
|
79 (xmlSecXkmsServerRequestId id, |
|
80 xmlSecXkmsServerCtxPtr ctx, |
|
81 xmlNodePtr node); |
|
82 struct _xmlSecXkmsServerRequestKlass { |
|
83 const xmlChar* name; |
|
84 const xmlChar* requestNodeName; |
|
85 const xmlChar* requestNodeNs; |
|
86 const xmlChar* resultNodeName; |
|
87 const xmlChar* resultNodeNs; |
|
88 xmlSecBitMask flags; |
|
89 |
|
90 xmlSecXkmsServerRequestNodeReadMethod readNode; |
|
91 xmlSecXkmsServerRequestNodeWriteMethod writeNode; |
|
92 xmlSecXkmsServerRequestExecuteMethod execute; |
|
93 |
|
94 void* reserved1; |
|
95 void* reserved2; |
|
96 }; |
|
97 |
|
98 #define xmlSecXkmsServerRequestKlassGetName(id) \ |
|
99 ((((id) != NULL) && ((id)->name != NULL)) ? (id)->name : NULL) |
|
100 |
|
101 |
|
102 /************************************************************************ |
|
103 * |
|
104 * XKMS ServerRequest Klass flags |
|
105 * |
|
106 ************************************************************************/ |
|
107 /** |
|
108 * XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND: |
|
109 * |
|
110 * The server request klass is allowed in xkms:CompoundRequest element. |
|
111 */ |
|
112 #define XMLSEC_XKMS_SERVER_REQUEST_KLASS_ALLOWED_IN_COUMPOUND 0x00000001 |
|
113 |
|
114 #ifdef __cplusplus |
|
115 } |
|
116 #endif /* __cplusplus */ |
|
117 |
|
118 #endif /* XMLSEC_NO_XKMS */ |
|
119 |
|
120 #endif /* __XMLSEC_PRIVATE_XKMS_H__ */ |
|
121 |