518 value = Base64.decode(sigValueElem);
519 } catch (Base64DecodingException bde) {
520 throw new MarshalException(bde);
521 }
522
523 Attr attr = sigValueElem.getAttributeNodeNS(null, "Id");
524 if (attr != null) {
525 id = attr.getValue();
526 sigValueElem.setIdAttributeNode(attr, true);
527 } else {
528 id = null;
529 }
530 this.sigValueElem = sigValueElem;
531 }
532
533 public String getId() {
534 return id;
535 }
536
537 public byte[] getValue() {
538 return (value == null) ? null : (byte[])value.clone();
539 }
540
541 public boolean validate(XMLValidateContext validateContext)
542 throws XMLSignatureException
543 {
544 if (validateContext == null) {
545 throw new NullPointerException("context cannot be null");
546 }
547
548 if (validated) {
549 return validationStatus;
550 }
551
552 // get validating key
553 SignatureMethod sm = si.getSignatureMethod();
554 Key validationKey = null;
555 KeySelectorResult ksResult;
556 try {
557 ksResult = validateContext.getKeySelector().select
558 (ki, KeySelector.Purpose.VERIFY, sm, validateContext);
|
518 value = Base64.decode(sigValueElem);
519 } catch (Base64DecodingException bde) {
520 throw new MarshalException(bde);
521 }
522
523 Attr attr = sigValueElem.getAttributeNodeNS(null, "Id");
524 if (attr != null) {
525 id = attr.getValue();
526 sigValueElem.setIdAttributeNode(attr, true);
527 } else {
528 id = null;
529 }
530 this.sigValueElem = sigValueElem;
531 }
532
533 public String getId() {
534 return id;
535 }
536
537 public byte[] getValue() {
538 return (value == null) ? null : value.clone();
539 }
540
541 public boolean validate(XMLValidateContext validateContext)
542 throws XMLSignatureException
543 {
544 if (validateContext == null) {
545 throw new NullPointerException("context cannot be null");
546 }
547
548 if (validated) {
549 return validationStatus;
550 }
551
552 // get validating key
553 SignatureMethod sm = si.getSignatureMethod();
554 Key validationKey = null;
555 KeySelectorResult ksResult;
556 try {
557 ksResult = validateContext.getKeySelector().select
558 (ki, KeySelector.Purpose.VERIFY, sm, validateContext);
|