|
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 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
12 */ |
|
13 #ifndef __XMLSEC_XKMS_H__ |
|
14 #define __XMLSEC_XKMS_H__ |
|
15 #include "xmlsec_config.h" |
|
16 #ifndef XMLSEC_NO_XKMS |
|
17 |
|
18 #ifdef __cplusplus |
|
19 extern "C" { |
|
20 #endif /* __cplusplus */ |
|
21 #include <stdio.h> |
|
22 |
|
23 #include <libxml2_tree.h> |
|
24 #include <libxml2_parser.h> |
|
25 |
|
26 #include "xmlsec_xmlsec.h" |
|
27 #include "xmlsec_buffer.h" |
|
28 #include "xmlsec_list.h" |
|
29 #include "xmlsec_keys.h" |
|
30 #include "xmlsec_keysmngr.h" |
|
31 #include "xmlsec_keyinfo.h" |
|
32 #include "xmlsec_transforms.h" |
|
33 |
|
34 /************************************************************************ |
|
35 * |
|
36 * Forward declarations. These internal xmlsec library structures are |
|
37 * declared in "xmlsec/private/xkms.h" file. |
|
38 * |
|
39 ************************************************************************/ |
|
40 typedef struct _xmlSecXkmsRespondWithKlass xmlSecXkmsRespondWithKlass, |
|
41 *xmlSecXkmsRespondWithId; |
|
42 |
|
43 typedef struct _xmlSecXkmsServerRequestKlass xmlSecXkmsServerRequestKlass, |
|
44 *xmlSecXkmsServerRequestId; |
|
45 |
|
46 |
|
47 /** |
|
48 * xmlSecXkmsResultMajor: |
|
49 * @xmlSecXkmsResultMajorSuccess: The operation succeeded. |
|
50 * @xmlSecXkmsResultMajorVersionMismatch: The service does not support |
|
51 * the protocol version specified |
|
52 * in the request. |
|
53 * @xmlSecXkmsResultMajorSender: An error occurred that was due |
|
54 * to the message sent by the sender. |
|
55 * @xmlSecXkmsResultMajorReceiver: An error occurred at the receiver. |
|
56 * @xmlSecXkmsResultMajorRepresent: The service has not acted on the |
|
57 * request. In order for the request |
|
58 * to be acted upon the request MUST |
|
59 * be represented with the specified |
|
60 * nonce in accordance with the two |
|
61 * phase protocol. |
|
62 * @xmlSecXkmsResultMajorPending: The request has been accepted |
|
63 * for processing and the service |
|
64 * will return the result asynchronously. |
|
65 * |
|
66 * The values for ResultMajor attribute. |
|
67 */ |
|
68 typedef enum { |
|
69 xmlSecXkmsResultMajorSuccess = 0, |
|
70 xmlSecXkmsResultMajorVersionMismatch, |
|
71 xmlSecXkmsResultMajorSender, |
|
72 xmlSecXkmsResultMajorReceiver, |
|
73 xmlSecXkmsResultMajorRepresent, |
|
74 xmlSecXkmsResultMajorPending |
|
75 } xmlSecXkmsResultMajor; |
|
76 |
|
77 /** |
|
78 * xmlSecXkmsResultMinor: |
|
79 * @xmlSecXkmsResultMinorNone: No minor result code available. |
|
80 * @xmlSecXkmsResultMinorNoMatch: No match was found for the search |
|
81 * prototype provided. |
|
82 * @xmlSecXkmsResultMinorTooManyResponses: The request resulted in the |
|
83 * number of responses that |
|
84 * exceeded either the ResponseLimit |
|
85 * value specified in the request or |
|
86 * some other limit determined by |
|
87 * the service. The service MAY |
|
88 * either return a subset of the |
|
89 * possible responses or none at all. |
|
90 * @xmlSecXkmsResultMinorIncomplete: Only part of the information |
|
91 * requested could be provided. |
|
92 * @xmlSecXkmsResultMinorFailure: The service attempted to perform |
|
93 * the request but the operation |
|
94 * failed for unspecified reasons. |
|
95 * @xmlSecXkmsResultMinorRefused: The operation was refused. The |
|
96 * service did not attempt to |
|
97 * perform the request. |
|
98 * @xmlSecXkmsResultMinorNoAuthentication: The operation was refused |
|
99 * because the necessary authentication |
|
100 * information was incorrect or missing. |
|
101 * @xmlSecXkmsResultMinorMessageNotSupported: The receiver does not implement |
|
102 * the specified operation. |
|
103 * @xmlSecXkmsResultMinorUnknownResponseId: The ResponseId for which pending |
|
104 * status was requested is unknown to |
|
105 * the service. |
|
106 * @xmlSecXkmsResultMinorSynchronous: The receiver does not support |
|
107 * synchronous processing of this |
|
108 * type of request. |
|
109 * |
|
110 * The values for ResultMinor attribute. |
|
111 */ |
|
112 typedef enum { |
|
113 xmlSecXkmsResultMinorNone = 0, |
|
114 xmlSecXkmsResultMinorNoMatch, |
|
115 xmlSecXkmsResultMinorTooManyResponses, |
|
116 xmlSecXkmsResultMinorIncomplete, |
|
117 xmlSecXkmsResultMinorFailure, |
|
118 xmlSecXkmsResultMinorRefused, |
|
119 xmlSecXkmsResultMinorNoAuthentication, |
|
120 xmlSecXkmsResultMinorMessageNotSupported, |
|
121 xmlSecXkmsResultMinorUnknownResponseId, |
|
122 xmlSecXkmsResultMinorSynchronous |
|
123 } xmlSecXkmsResultMinor; |
|
124 |
|
125 /** |
|
126 * xmlSecXkmsKeyBindingStatus: |
|
127 * @xmlSecXkmsKeyBindingStatusNone: The key status is not available. |
|
128 * @xmlSecXkmsKeyBindingStatusValid: The key is valid. |
|
129 * @xmlSecXkmsKeyBindingStatusInvalid: The key is not valid. |
|
130 * @xmlSecXkmsKeyBindingStatusIndeterminate: Could not determine key status. |
|
131 * |
|
132 * The values for key binding StatusValue attribute. |
|
133 */ |
|
134 typedef enum { |
|
135 xmlSecXkmsKeyBindingStatusNone, |
|
136 xmlSecXkmsKeyBindingStatusValid, |
|
137 xmlSecXkmsKeyBindingStatusInvalid, |
|
138 xmlSecXkmsKeyBindingStatusIndeterminate |
|
139 } xmlSecXkmsKeyBindingStatus; |
|
140 |
|
141 /** |
|
142 * xmlSecXkmsServerFormat: |
|
143 * @xmlSecXkmsServerFormatUnknown: The format is unknown. |
|
144 * @xmlSecXkmsServerFormatPlain: The request/response are not enveloped. |
|
145 * @xmlSecXkmsServerFormatSoap1_1: The request/response are SOAP 1.1 encapsulated |
|
146 * @xmlSecXkmsServerFormatSoap1_2: The request/response are SOAP 1.2 encapsulated. |
|
147 * |
|
148 * The xkms server request/response format. |
|
149 */ |
|
150 typedef enum { |
|
151 xmlSecXkmsServerFormatUnknown = 0, |
|
152 xmlSecXkmsServerFormatPlain, |
|
153 xmlSecXkmsServerFormatSoap11, |
|
154 xmlSecXkmsServerFormatSoap12 |
|
155 } xmlSecXkmsServerFormat; |
|
156 |
|
157 XMLSEC_EXPORT xmlSecXkmsServerFormat xmlSecXkmsServerFormatFromString |
|
158 (const xmlChar* str); |
|
159 XMLSEC_EXPORT const xmlChar* xmlSecXkmsServerFormatToString (xmlSecXkmsServerFormat format); |
|
160 |
|
161 /************************************************************************ |
|
162 * |
|
163 * XKMS requests server side processing klass |
|
164 * |
|
165 ************************************************************************/ |
|
166 /** |
|
167 * xmlSecXkmsServerCtx: |
|
168 * @userData: the pointer to user data (xmlsec and xmlsec-crypto libraries |
|
169 * never touches this). |
|
170 * @flags: the XML Encryption processing flags. |
|
171 * @flags2: the XML Encryption processing flags. |
|
172 * @keyInfoReadCtx: the reading key context. |
|
173 * @keyInfoWriteCtx: the writing key context (not used for signature verification). |
|
174 * @reserved0: reserved for the future. |
|
175 * @reserved1: reserved for the future. |
|
176 * |
|
177 * XKMS context. |
|
178 */ |
|
179 struct _xmlSecXkmsServerCtx { |
|
180 /* these data user can set before performing the operation */ |
|
181 void* userData; |
|
182 xmlSecBitMask flags; |
|
183 xmlSecBitMask flags2; |
|
184 xmlSecKeyInfoCtx keyInfoReadCtx; |
|
185 xmlSecKeyInfoCtx keyInfoWriteCtx; |
|
186 xmlSecPtrList enabledRespondWithIds; |
|
187 xmlSecPtrList enabledServerRequestIds; |
|
188 xmlChar* expectedService; |
|
189 xmlChar* idPrefix; |
|
190 xmlSecSize idLen; |
|
191 |
|
192 /* these data are returned */ |
|
193 xmlSecPtrList keys; |
|
194 xmlSecXkmsResultMajor resultMajor; |
|
195 xmlSecXkmsResultMinor resultMinor; |
|
196 xmlSecXkmsServerRequestId requestId; |
|
197 xmlChar* id; |
|
198 xmlChar* service; |
|
199 xmlChar* nonce; |
|
200 xmlChar* originalRequestId; |
|
201 xmlChar* pendingNotificationMechanism; |
|
202 xmlChar* pendingNotificationIdentifier; |
|
203 int responseLimit; |
|
204 xmlSecBitMask responseMechanismMask; |
|
205 xmlSecPtrListPtr compoundRequestContexts; |
|
206 |
|
207 /* these are internal data, nobody should change that except us */ |
|
208 xmlNodePtr requestNode; |
|
209 xmlNodePtr opaqueClientDataNode; |
|
210 xmlNodePtr firtsMsgExtNode; |
|
211 xmlNodePtr keyInfoNode; |
|
212 xmlSecPtrList respWithList; |
|
213 |
|
214 /* reserved for future */ |
|
215 void* reserved0; |
|
216 void* reserved1; |
|
217 }; |
|
218 |
|
219 XMLSEC_EXPORT xmlSecXkmsServerCtxPtr xmlSecXkmsServerCtxCreate (xmlSecKeysMngrPtr keysMngr); |
|
220 XMLSEC_EXPORT void xmlSecXkmsServerCtxDestroy (xmlSecXkmsServerCtxPtr ctx); |
|
221 XMLSEC_EXPORT int xmlSecXkmsServerCtxInitialize (xmlSecXkmsServerCtxPtr ctx, |
|
222 xmlSecKeysMngrPtr keysMngr); |
|
223 XMLSEC_EXPORT void xmlSecXkmsServerCtxFinalize (xmlSecXkmsServerCtxPtr ctx); |
|
224 XMLSEC_EXPORT void xmlSecXkmsServerCtxReset (xmlSecXkmsServerCtxPtr ctx); |
|
225 XMLSEC_EXPORT int xmlSecXkmsServerCtxCopyUserPref (xmlSecXkmsServerCtxPtr dst, |
|
226 xmlSecXkmsServerCtxPtr src); |
|
227 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxProcess (xmlSecXkmsServerCtxPtr ctx, |
|
228 xmlNodePtr node, |
|
229 xmlSecXkmsServerFormat format, |
|
230 xmlDocPtr doc); |
|
231 XMLSEC_EXPORT int xmlSecXkmsServerCtxRequestRead (xmlSecXkmsServerCtxPtr ctx, |
|
232 xmlNodePtr node); |
|
233 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxResponseWrite(xmlSecXkmsServerCtxPtr ctx, |
|
234 xmlDocPtr doc); |
|
235 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxRequestUnwrap(xmlSecXkmsServerCtxPtr ctx, |
|
236 xmlNodePtr node, |
|
237 xmlSecXkmsServerFormat format); |
|
238 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxResponseWrap (xmlSecXkmsServerCtxPtr ctx, |
|
239 xmlNodePtr node, |
|
240 xmlSecXkmsServerFormat format, |
|
241 xmlDocPtr doc); |
|
242 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerCtxFatalErrorResponseCreate |
|
243 (xmlSecXkmsServerCtxPtr ctx, |
|
244 xmlSecXkmsServerFormat format, |
|
245 xmlDocPtr doc); |
|
246 XMLSEC_EXPORT void xmlSecXkmsServerCtxSetResult (xmlSecXkmsServerCtxPtr ctx, |
|
247 xmlSecXkmsResultMajor resultMajor, |
|
248 xmlSecXkmsResultMinor resultMinor); |
|
249 XMLSEC_EXPORT void xmlSecXkmsServerCtxDebugDump (xmlSecXkmsServerCtxPtr ctx, |
|
250 FILE* output); |
|
251 XMLSEC_EXPORT void xmlSecXkmsServerCtxDebugXmlDump (xmlSecXkmsServerCtxPtr ctx, |
|
252 FILE* output); |
|
253 |
|
254 /************************************************************************ |
|
255 * |
|
256 * xmlSecXkmsServerCtxPtr list |
|
257 * |
|
258 ************************************************************************/ |
|
259 /** |
|
260 * xmlSecXkmsServerCtxPtrListId: |
|
261 * |
|
262 * zmlSecXkmsServerCtx klasses list klass. |
|
263 */ |
|
264 #define xmlSecXkmsServerCtxPtrListId xmlSecXkmsServerCtxPtrListGetKlass() |
|
265 XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsServerCtxPtrListGetKlass |
|
266 (void); |
|
267 |
|
268 /************************************************************************ |
|
269 * |
|
270 * xmlSecXkmsServerCtxFlags |
|
271 * |
|
272 ************************************************************************/ |
|
273 /** |
|
274 * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPONSE_MECHANISM |
|
275 * |
|
276 * If flag is set then we abort if an unknown <xkms:ResponseMechanism/> |
|
277 * value is found. |
|
278 */ |
|
279 #define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPONSE_MECHANISM 0x00000001 |
|
280 |
|
281 /** |
|
282 * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPOND_WITH |
|
283 * |
|
284 * If flag is set then we abort if an unknown <xkms:RespondWith/> |
|
285 * value is found. |
|
286 */ |
|
287 #define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_RESPOND_WITH 0x00000002 |
|
288 |
|
289 /** |
|
290 * XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_KEY_USAGE |
|
291 * |
|
292 * If flag is set then we abort if an unknown <xkms:KeyUsage/> |
|
293 * value is found. |
|
294 */ |
|
295 #define XMLSEC_XKMS_SERVER_FLAGS_STOP_ON_UNKNOWN_KEY_USAGE 0x00000004 |
|
296 |
|
297 /************************************************************************ |
|
298 * |
|
299 * XKMS ResponseMechanism element values. |
|
300 * |
|
301 ************************************************************************/ |
|
302 /** |
|
303 * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT: |
|
304 * |
|
305 * XKMS ResponseMechanism element value. The requestor is prepared to |
|
306 * accept a response that uses asynchronous processing, i.e. the service |
|
307 * MAY return the MajorResult code Pending. |
|
308 */ |
|
309 #define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_PENDING 0x00000001 |
|
310 |
|
311 /** |
|
312 * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT: |
|
313 * |
|
314 * XKMS ResponseMechanism element value. The requestor is prepared to |
|
315 * accept a response that uses the two phase protocol, i.e. the service |
|
316 * MAY return the MajorResult code Represent. |
|
317 */ |
|
318 #define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REPRESENT 0x00000002 |
|
319 |
|
320 /** |
|
321 * XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REQUEST_SIGNATURE_VALUE: |
|
322 * |
|
323 * XKMS ResponseMechanism element value. The requestor is prepared to |
|
324 * accept a response that carries a <RequestSignatureValue> element. |
|
325 */ |
|
326 #define XMLSEC_XKMS_RESPONSE_MECHANISM_MASK_REQUEST_SIGNATURE_VALUE 0x00000004 |
|
327 |
|
328 /************************************************************************ |
|
329 * |
|
330 * XKMS ResponseLimit element values |
|
331 * |
|
332 ************************************************************************/ |
|
333 /** |
|
334 * XMLSEC_XKMS_NO_RESPONSE_LIMIT: |
|
335 * |
|
336 * The ResponseLimit is not specified. |
|
337 */ |
|
338 #define XMLSEC_XKMS_NO_RESPONSE_LIMIT -1 |
|
339 |
|
340 |
|
341 /************************************************************************ |
|
342 * |
|
343 * XKMS KeyBinding reason values |
|
344 * |
|
345 ************************************************************************/ |
|
346 /** |
|
347 * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_ISSUER_TRAST: |
|
348 * |
|
349 * The issuer of the information on which the key binding is based is |
|
350 * considered to be trustworthy by the XKMS service. |
|
351 * |
|
352 * X.509 Equivalents |
|
353 * - Valid: Certificate path anchored by trusted root successfully constructed. |
|
354 * - Invalid: Certificate path could not be constructed to a trusted root. |
|
355 */ |
|
356 #define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_ISSUER_TRAST 0x00000001 |
|
357 |
|
358 /** |
|
359 * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_REVOCATION_STATUS: |
|
360 * |
|
361 * The XKMS service has affirmatively verified the status of the |
|
362 * key binding with an authoritative source |
|
363 * |
|
364 * X.509 Equivalents |
|
365 * - Valid: Certificate status validated using CRL or OCSP. |
|
366 * - Invalid: Certificate status returned revoked or suspended. |
|
367 */ |
|
368 #define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_REVOCATION_STATUS 0x00000002 |
|
369 |
|
370 /** |
|
371 * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_VALIDITY_INTERVAL: |
|
372 * |
|
373 * The requested time instant was within the validity interval of |
|
374 * the key binding |
|
375 * |
|
376 * X.509 Equivalents |
|
377 * - Valid: The certificate chain was valid at the requested time instant. |
|
378 * - Invalid: The requested time instant was before or after the certificate |
|
379 * chain validity interval. |
|
380 */ |
|
381 #define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_VALIDITY_INTERVAL 0x00000004 |
|
382 |
|
383 /** |
|
384 * XMLSEC_XKMS_KEY_BINDING_REASON_MASK_SIGNATURE: |
|
385 * |
|
386 * Signature on signed data provided by the client in the <Keyinfo> element was |
|
387 * successfully verified. |
|
388 * |
|
389 * X.509 Equivalents |
|
390 * - Valid: Certificate Signature verified. |
|
391 * - Invalid: Certificate Signature verification failed. |
|
392 */ |
|
393 #define XMLSEC_XKMS_KEY_BINDING_REASON_MASK_SIGNATURE 0x00000008 |
|
394 |
|
395 |
|
396 /************************************************************************ |
|
397 * |
|
398 * XKMS RespondWith Klass |
|
399 * |
|
400 ************************************************************************/ |
|
401 XMLSEC_EXPORT xmlSecPtrListPtr xmlSecXkmsRespondWithIdsGet (void); |
|
402 XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsInit (void); |
|
403 XMLSEC_EXPORT void xmlSecXkmsRespondWithIdsShutdown(void); |
|
404 XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsRegisterDefault |
|
405 (void); |
|
406 XMLSEC_EXPORT int xmlSecXkmsRespondWithIdsRegister(xmlSecXkmsRespondWithId id); |
|
407 XMLSEC_EXPORT int xmlSecXkmsRespondWithNodeRead (xmlSecXkmsRespondWithId id, |
|
408 xmlSecXkmsServerCtxPtr ctx, |
|
409 xmlNodePtr node); |
|
410 XMLSEC_EXPORT int xmlSecXkmsRespondWithNodeWrite (xmlSecXkmsRespondWithId id, |
|
411 xmlSecXkmsServerCtxPtr ctx, |
|
412 xmlNodePtr node); |
|
413 XMLSEC_EXPORT void xmlSecXkmsRespondWithDebugDump (xmlSecXkmsRespondWithId id, |
|
414 FILE* output); |
|
415 XMLSEC_EXPORT void xmlSecXkmsRespondWithDebugXmlDump |
|
416 (xmlSecXkmsRespondWithId id, |
|
417 FILE* output); |
|
418 XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeRead |
|
419 (xmlSecXkmsRespondWithId id, |
|
420 xmlSecXkmsServerCtxPtr ctx, |
|
421 xmlNodePtr node); |
|
422 XMLSEC_EXPORT int xmlSecXkmsRespondWithDefaultNodeWrite |
|
423 (xmlSecXkmsRespondWithId id, |
|
424 xmlSecXkmsServerCtxPtr ctx, |
|
425 xmlNodePtr node); |
|
426 /************************************************************************ |
|
427 * |
|
428 * XKMS RespondWith Klass List |
|
429 * |
|
430 ************************************************************************/ |
|
431 /** |
|
432 * xmlSecXkmsRespondWithIdListId: |
|
433 * |
|
434 * XKMS RespondWith klasses list klass. |
|
435 */ |
|
436 #define xmlSecXkmsRespondWithIdListId xmlSecXkmsRespondWithIdListGetKlass() |
|
437 XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsRespondWithIdListGetKlass |
|
438 (void); |
|
439 XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListFind (xmlSecPtrListPtr list, |
|
440 xmlSecXkmsRespondWithId id); |
|
441 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithIdListFindByNodeValue |
|
442 (xmlSecPtrListPtr list, |
|
443 xmlNodePtr node); |
|
444 XMLSEC_EXPORT int xmlSecXkmsRespondWithIdListWrite(xmlSecPtrListPtr list, |
|
445 xmlSecXkmsServerCtxPtr ctx, |
|
446 xmlNodePtr node); |
|
447 |
|
448 /******************************************************************** |
|
449 * |
|
450 * XML Sec Library RespondWith Ids |
|
451 * |
|
452 *******************************************************************/ |
|
453 /** |
|
454 * xmlSecXkmsRespondWithIdUnknown: |
|
455 * |
|
456 * The "unknown" RespondWith id (NULL). |
|
457 */ |
|
458 #define xmlSecXkmsRespondWithIdUnknown NULL |
|
459 |
|
460 /** |
|
461 * xmlSecXkmsRespondWithKeyNameId: |
|
462 * |
|
463 * The respond with KeyName klass. |
|
464 */ |
|
465 #define xmlSecXkmsRespondWithKeyNameId \ |
|
466 xmlSecXkmsRespondWithKeyNameGetKlass() |
|
467 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyNameGetKlass(void); |
|
468 |
|
469 /** |
|
470 * xmlSecXkmsRespondWithKeyValueId: |
|
471 * |
|
472 * The respond with KeyValue klass. |
|
473 */ |
|
474 #define xmlSecXkmsRespondWithKeyValueId \ |
|
475 xmlSecXkmsRespondWithKeyValueGetKlass() |
|
476 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithKeyValueGetKlass(void); |
|
477 |
|
478 /** |
|
479 * xmlSecXkmsRespondWithPrivateKeyId: |
|
480 * |
|
481 * The respond with PrivateKey klass. |
|
482 */ |
|
483 #define xmlSecXkmsRespondWithPrivateKeyId \ |
|
484 xmlSecXkmsRespondWithPrivateKeyGetKlass() |
|
485 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPrivateKeyGetKlass(void); |
|
486 |
|
487 /** |
|
488 * xmlSecXkmsRespondWithRetrievalMethodId: |
|
489 * |
|
490 * The respond with RetrievalMethod klass. |
|
491 */ |
|
492 #define xmlSecXkmsRespondWithRetrievalMethodId \ |
|
493 xmlSecXkmsRespondWithRetrievalMethodGetKlass() |
|
494 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithRetrievalMethodGetKlass(void); |
|
495 |
|
496 /** |
|
497 * xmlSecXkmsRespondWithX509CertId: |
|
498 * |
|
499 * The respond with X509Cert klass. |
|
500 */ |
|
501 #define xmlSecXkmsRespondWithX509CertId \ |
|
502 xmlSecXkmsRespondWithX509CertGetKlass() |
|
503 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CertGetKlass(void); |
|
504 |
|
505 /** |
|
506 * xmlSecXkmsRespondWithX509ChainId: |
|
507 * |
|
508 * The respond with X509Chain klass. |
|
509 */ |
|
510 #define xmlSecXkmsRespondWithX509ChainId \ |
|
511 xmlSecXkmsRespondWithX509ChainGetKlass() |
|
512 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509ChainGetKlass(void); |
|
513 |
|
514 /** |
|
515 * xmlSecXkmsRespondWithX509CRLId: |
|
516 * |
|
517 * The respond with X509CRL klass. |
|
518 */ |
|
519 #define xmlSecXkmsRespondWithX509CRLId \ |
|
520 xmlSecXkmsRespondWithX509CRLGetKlass() |
|
521 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithX509CRLGetKlass(void); |
|
522 |
|
523 |
|
524 /** |
|
525 * xmlSecXkmsRespondWithPGPId: |
|
526 * |
|
527 * The respond with PGP klass. |
|
528 */ |
|
529 #define xmlSecXkmsRespondWithPGPId \ |
|
530 xmlSecXkmsRespondWithPGPGetKlass() |
|
531 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithPGPGetKlass(void); |
|
532 |
|
533 /** |
|
534 * xmlSecXkmsRespondWithSPKIId: |
|
535 * |
|
536 * The respond with SPKI klass. |
|
537 */ |
|
538 #define xmlSecXkmsRespondWithSPKIId \ |
|
539 xmlSecXkmsRespondWithSPKIGetKlass() |
|
540 XMLSEC_EXPORT xmlSecXkmsRespondWithId xmlSecXkmsRespondWithSPKIGetKlass(void); |
|
541 |
|
542 |
|
543 /************************************************************************ |
|
544 * |
|
545 * XKMS ServerRequest Klass |
|
546 * |
|
547 ************************************************************************/ |
|
548 XMLSEC_EXPORT xmlSecPtrListPtr xmlSecXkmsServerRequestIdsGet (void); |
|
549 XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsInit (void); |
|
550 XMLSEC_EXPORT void xmlSecXkmsServerRequestIdsShutdown |
|
551 (void); |
|
552 XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsRegisterDefault |
|
553 (void); |
|
554 XMLSEC_EXPORT int xmlSecXkmsServerRequestIdsRegister |
|
555 (xmlSecXkmsServerRequestId id); |
|
556 XMLSEC_EXPORT int xmlSecXkmsServerRequestNodeRead (xmlSecXkmsServerRequestId id, |
|
557 xmlSecXkmsServerCtxPtr ctx, |
|
558 xmlNodePtr node); |
|
559 XMLSEC_EXPORT int xmlSecXkmsServerRequestExecute (xmlSecXkmsServerRequestId id, |
|
560 xmlSecXkmsServerCtxPtr ctx); |
|
561 XMLSEC_EXPORT xmlNodePtr xmlSecXkmsServerRequestNodeWrite(xmlSecXkmsServerRequestId id, |
|
562 xmlSecXkmsServerCtxPtr ctx, |
|
563 xmlDocPtr doc, |
|
564 xmlNodePtr node); |
|
565 XMLSEC_EXPORT void xmlSecXkmsServerRequestDebugDump(xmlSecXkmsServerRequestId id, |
|
566 FILE* output); |
|
567 XMLSEC_EXPORT void xmlSecXkmsServerRequestDebugXmlDump |
|
568 (xmlSecXkmsServerRequestId id, |
|
569 FILE* output); |
|
570 |
|
571 /************************************************************************ |
|
572 * |
|
573 * XKMS ServerRequest Klass List |
|
574 * |
|
575 ************************************************************************/ |
|
576 /** |
|
577 * xmlSecXkmsServerRequestIdListId: |
|
578 * |
|
579 * XKMS ServerRequest klasses list klass. |
|
580 */ |
|
581 #define xmlSecXkmsServerRequestIdListId xmlSecXkmsServerRequestIdListGetKlass() |
|
582 XMLSEC_EXPORT xmlSecPtrListId xmlSecXkmsServerRequestIdListGetKlass |
|
583 (void); |
|
584 XMLSEC_EXPORT int xmlSecXkmsServerRequestIdListFind |
|
585 (xmlSecPtrListPtr list, |
|
586 xmlSecXkmsServerRequestId id); |
|
587 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestIdListFindByName |
|
588 (xmlSecPtrListPtr list, |
|
589 const xmlChar* name); |
|
590 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestIdListFindByNode |
|
591 (xmlSecPtrListPtr list, |
|
592 xmlNodePtr node); |
|
593 |
|
594 /** |
|
595 * xmlSecXkmsServerRequestIdUnknown: |
|
596 * |
|
597 * The "unknown" ServerRequest id (NULL). |
|
598 */ |
|
599 #define xmlSecXkmsServerRequestIdUnknown NULL |
|
600 |
|
601 /** |
|
602 * xmlSecXkmsServerRequestResultId: |
|
603 * |
|
604 * The Result response klass. |
|
605 */ |
|
606 #define xmlSecXkmsServerRequestResultId \ |
|
607 xmlSecXkmsServerRequestResultGetKlass() |
|
608 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestResultGetKlass(void); |
|
609 |
|
610 /** |
|
611 * xmlSecXkmsServerRequestStatusId: |
|
612 * |
|
613 * The StatusRequest klass. |
|
614 */ |
|
615 #define xmlSecXkmsServerRequestStatusId \ |
|
616 xmlSecXkmsServerRequestStatusGetKlass() |
|
617 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestStatusGetKlass(void); |
|
618 |
|
619 /** |
|
620 * xmlSecXkmsServerRequestCompoundId: |
|
621 * |
|
622 * The CompoundRequest klass. |
|
623 */ |
|
624 #define xmlSecXkmsServerRequestCompoundId \ |
|
625 xmlSecXkmsServerRequestCompoundGetKlass() |
|
626 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestCompoundGetKlass(void); |
|
627 |
|
628 /** |
|
629 * xmlSecXkmsServerRequestLocateId: |
|
630 * |
|
631 * The LocateRequest klass. |
|
632 */ |
|
633 #define xmlSecXkmsServerRequestLocateId \ |
|
634 xmlSecXkmsServerRequestLocateGetKlass() |
|
635 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestLocateGetKlass(void); |
|
636 |
|
637 /** |
|
638 * xmlSecXkmsServerRequestValidateId: |
|
639 * |
|
640 * The ValidateRequest klass. |
|
641 */ |
|
642 #define xmlSecXkmsServerRequestValidateId \ |
|
643 xmlSecXkmsServerRequestValidateGetKlass() |
|
644 XMLSEC_EXPORT xmlSecXkmsServerRequestId xmlSecXkmsServerRequestValidateGetKlass(void); |
|
645 |
|
646 #ifdef __cplusplus |
|
647 } |
|
648 #endif /* __cplusplus */ |
|
649 |
|
650 #endif /* XMLSEC_NO_XKMS */ |
|
651 |
|
652 #endif /* __XMLSEC_XKMS_H__ */ |
|
653 |