/usr/include/rampart-1.3.0/oxs_tokens.h is in librampart-dev 1.3.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OXS_TOKENS_H
#define OXS_TOKENS_H
#include <axis2_util.h>
#include <stdio.h>
#include <axutil_qname.h>
#include <axis2_defines.h>
#include <axutil_env.h>
#include <axiom_node.h>
#include <axiom_element.h>
#include <axiom_attribute.h>
#include <oxs_constants.h>
#include <rampart_constants.h>
#include <oxs_utility.h>
#include <oxs_axiom.h>
#include <axutil_array_list.h>
/**
* @file oxs_tokens.h
* @brief includes all tokens of OMXMLSecurity.
*/
#ifdef __cplusplus
extern "C"
{
#endif
/**
* @defgroup oxs_token OMXMLSecurity Tokens
* @ingroup oxs
* @{
*/
/**
* Creates <wsse:BinarySecurityToken> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_binary_security_token_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id,
axis2_char_t * encoding_type,
axis2_char_t * value_type,
axis2_char_t * data);
/**
* Creates <ds:CanonicalizationMethod> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_c14n_method_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * algorithm);
/**
* Gets algorithm from <ds:CanonicalizationMethod> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_c14n_method(
const axutil_env_t * env,
axiom_node_t * c14n_mtd_node);
/**
* Creates <xenc:CipherData> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_cipher_data_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Gets cipher value from <xenc:CipherData> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_cipher_value_from_cipher_data(
const axutil_env_t * env,
axiom_node_t * cd_node);
/**
* Creates <xenc:CipherValue> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_cipher_value_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * cipher_val);
/**
* Gets value from <xenc:CipherValue> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_cipher_value(
const axutil_env_t * env,
axiom_node_t * cv_node);
/**
* Creates <xenc:DataReference> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_data_reference_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * data_ref);
/**
* Gets URI reference from <xenc:DataReference> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_data_reference(
const axutil_env_t * env,
axiom_node_t * data_ref_node);
/**
* Creates <ds:DigestMethod> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_digest_method_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * algorithm);
/**
* Gets the algorithm from <ds:DigestMethod> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_digest_method(
const axutil_env_t * env,
axiom_node_t * enc_mtd_node);
/**
* Creates <ds:DigestValue> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_digest_value_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * digest_val);
/**
* Gets the value from <ds:DigestValue> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_digest_value(
const axutil_env_t * env,
axiom_node_t * sv_node);
/**
* Creates <ds:Reference> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_ds_reference_element(
const axutil_env_t *env,
axiom_node_t *parent,
axis2_char_t *id,
axis2_char_t *uri,
axis2_char_t *type);
/**
* Gets URI reference from <ds:Reference> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_ds_reference(
const axutil_env_t * env,
axiom_node_t * ref_node);
/**
* Creates <wsse:Embedded> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_embedded_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id);
/**
* Gets id from <wsse:Embedded> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_embedded_id(
const axutil_env_t * env,
axiom_node_t * embedded_node);
/**
* Creates <xenc:EncryptedData> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_encrypted_data_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * type_attribute,
axis2_char_t * id);
/**
* Creates <xenc:EncryptedKey> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_encrypted_key_element(
const axutil_env_t * env,
axiom_node_t * parent );
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_get_encrypted_key_node(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <xenc:EncryptionMethod> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_encryption_method_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * algorithm);
/**
* Gets algorithm from <xenc:EncryptionMethod> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_encryption_method(
const axutil_env_t * env,
axiom_node_t * enc_mtd_node);
/**
* Creates <wsse:KeyIdentifier> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_key_identifier_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * encoding_type,
axis2_char_t * value_type,
axis2_char_t * value);
/**
* Creates <ds:KeyInfo> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_key_info_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:KeyName> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_key_name_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * key_name_val);
/**
* Creates <wsse:Reference> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_reference_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * ref,
axis2_char_t * value_type);
/**
* Gets URI reference from <wsse:Reference> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_reference(
const axutil_env_t * env,
axiom_node_t * ref_node);
/**
* Gets value type from <wsse:Reference> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_reference_value_type(
const axutil_env_t * env,
axiom_node_t * ref_node);
/**
* Creates <xenc:ReferenceList> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_reference_list_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <xenc:DataReference> elements under <xenc:ReferenceList> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_data_reference_list(
const axutil_env_t * env,
axiom_node_t * parent,
axutil_array_list_t * id_list);
/**
* Gets URI references from <xenc:DataReference> elements under <xenc:ReferenceList> element
*/
AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
oxs_token_get_reference_list_data(
const axutil_env_t * env,
axiom_node_t * ref_list_node);
/**
* Creates <wsse:SecurityTokenReference> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_security_token_reference_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:Signature> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_signature_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id);
/**
* Creates <wss11:EncryptedHeader> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_enc_header_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id);
/**
* Creates <ds:SignatureMethod> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_signature_method_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * algorithm);
/**
* Gets algorithm from <ds:SignatureMethod> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_signature_method(
const axutil_env_t * env,
axiom_node_t * enc_mtd_node);
/**
* Creates <ds:SignatureValue> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_signature_value_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * signature_val);
/**
* Gets signature value from <ds:SignatureValue> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_signature_value(
const axutil_env_t * env,
axiom_node_t * sv_node);
/**
* Creates <ds:SignedInfo> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_signed_info_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:Transform> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_transform_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * algorithm);
/**
* Gets algorithm from <ds:Transform> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_transform(
const axutil_env_t * env,
axiom_node_t * transform_node);
/**
* Creates <ds:Transforms> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_transforms_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:X509Certificate> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_x509_certificate_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * cert_data);
/**
* Gets data from <ds:X509Certificate> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_x509_certificate(
const axutil_env_t * env,
axiom_node_t * sv_node);
/**
* Creates <ds:X509Data> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_x509_data_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:X509IssuerName> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_issuer_name_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * value );
/**
* Gets issuer name from <ds:X509IssuerName> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_issuer_name(
const axutil_env_t * env,
axiom_node_t * issuer_name_node);
/**
* Creates <ds:X509IssuerSerial> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_x509_issuer_serial_element(
const axutil_env_t * env,
axiom_node_t * parent);
/**
* Creates <ds:X509IssuerSerial> element with issuer name and serial number
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_x509_issuer_serial_with_data(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * issuer_name,
axis2_char_t * serial_number);
/**
* Creates <ds:X509SerialNumber> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_serial_number_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * value );
/**
* Gets serial number from <ds:X509SerialNumber> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_serial_number(
const axutil_env_t * env,
axiom_node_t * serial_number_node);
/**
* Creates <wsse11:SignatureConfirmation> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_signature_confirmation_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id,
axis2_char_t * val);
/**
* Gets value from <wsse11:SignatureConfirmation> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_signature_confirmation_value(
const axutil_env_t * env,
axiom_node_t * signature_confirmation_node);
/**
* Gets id from <wsse11:SignatureConfirmation> element
*/
AXIS2_EXTERN axis2_char_t * AXIS2_CALL
oxs_token_get_signature_confirmation_id(
const axutil_env_t * env,
axiom_node_t * signature_confirmation_node);
/**
* Creates <wsc:DerivedKeyToken> element
*/
AXIS2_EXTERN axiom_node_t * AXIS2_CALL
oxs_token_build_derived_key_token_element(
const axutil_env_t * env,
axiom_node_t * parent,
axis2_char_t * id,
axis2_char_t * algo,
axis2_char_t* wsc_ns_uri);
/**
* Creates <wsc:Length> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_length_element(
const axutil_env_t *env,
axiom_node_t *parent,
int length,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Length> element
*/
AXIS2_EXTERN int AXIS2_CALL
oxs_token_get_length_value(
const axutil_env_t *env,
axiom_node_t *length_node);
/**
* Creates <wsc:Offset> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_offset_element(
const axutil_env_t *env,
axiom_node_t *parent,
int offset,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Offset> element
*/
AXIS2_EXTERN int AXIS2_CALL
oxs_token_get_offset_value(
const axutil_env_t *env,
axiom_node_t *offset_node);
/**
* Creates <wsc:Nonce> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_nonce_element(
const axutil_env_t *env,
axiom_node_t *parent,
axis2_char_t *nonce_val,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Nonce> element
*/
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
oxs_token_get_nonce_value(
const axutil_env_t *env,
axiom_node_t *nonce_node);
/**
* Creates <wsc:Label> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_label_element(
const axutil_env_t *env,
axiom_node_t *parent,
axis2_char_t *label,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Label> element
*/
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
oxs_token_get_label_value(
const axutil_env_t *env,
axiom_node_t *label_node);
/**
* Creates <wsc:Properties> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_properties_element(
const axutil_env_t *env,
axiom_node_t *parent,
axis2_char_t* properties_val,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Properties> element
*/
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
oxs_token_get_properties_value(
const axutil_env_t *env,
axiom_node_t *properties_node);
/**
* Creates <wsc:Generation> element
*/
AXIS2_EXTERN axiom_node_t* AXIS2_CALL
oxs_token_build_generation_element(
const axutil_env_t *env,
axiom_node_t *parent,
axis2_char_t *generation_val,
axis2_char_t *wsc_ns_uri);
/**
* Gets value from <wsc:Generation> element
*/
AXIS2_EXTERN axis2_char_t* AXIS2_CALL
oxs_token_get_generation_value(
const axutil_env_t *env,
axiom_node_t *generation_node);
/** @} */
#ifdef __cplusplus
}
#endif
#endif /*OXS_TOKENS_H */
|