From securitydcarr@example.net Fri Aug 03 18:35:34 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 16081 invoked from network); 3 Aug 2007 18:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2007 18:35:34 -0000 Received: (qmail 78003 invoked by uid 500); 3 Aug 2007 18:35:34 -0000 Delivered-To: dcarr@example.net Received: (qmail 77988 invoked by uid 500); 3 Aug 2007 18:35:34 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Received: (qmail 77974 invoked by uid 99); 3 Aug 2007 18:35:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 11:35:34 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 18:35:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CF13D1A981A; Fri, 3 Aug 2007 11:35:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562544 - /xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java Date: Fri, 03 Aug 2007 18:35:13 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: mullan Date: Fri Aug 3 11:35:12 2007 New Revision: 562544 URL: http://svn.apache.org/viewvc?view=rev&rev=562544 Log: Add ctor that takes KeySelector. Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java URL: http://svn.apache.org/viewvc/xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java?view=diff&rev=562544&r1=562543&r2=562544 ============================================================================== --- xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java (original) +++ xml/security/branches/stax_jsr105/src/com/r_bg/stax/StaxValidateContext.java Fri Aug 3 11:35:12 2007 @@ -29,7 +29,19 @@ } public StaxValidateContext(Key key, XMLStreamReader reader) { + if (key == null || reader == null) { + throw new NullPointerException(); + } setKeySelector(KeySelector.singletonKeySelector(key)); + this.reader = reader; + sig = new StaxSignatureVerificator(); + } + + public StaxValidateContext(KeySelector ks, XMLStreamReader reader) { + if (ks == null || reader == null) { + throw new NullPointerException(); + } + this.ks = ks; this.reader = reader; sig = new StaxSignatureVerificator(); } From securitydcarr@example.net Fri Aug 03 19:15:56 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 28003 invoked from network); 3 Aug 2007 19:15:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2007 19:15:56 -0000 Received: (qmail 46459 invoked by uid 500); 3 Aug 2007 19:15:55 -0000 Delivered-To: dcarr@example.net Received: (qmail 46436 invoked by uid 500); 3 Aug 2007 19:15:55 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Received: (qmail 46425 invoked by uid 99); 3 Aug 2007 19:15:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 12:15:55 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 19:15:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 51D371A981D; Fri, 3 Aug 2007 12:15:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562549 - /xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java Date: Fri, 03 Aug 2007 19:15:35 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: mullan Date: Fri Aug 3 12:15:34 2007 New Revision: 562549 URL: http://svn.apache.org/viewvc?view=rev&rev=562549 Log: Fix bug in attribute c14n, check for zero length prefix. Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java URL: http://svn.apache.org/viewvc/xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java?view=diff&rev=562549&r1=562548&r2=562549 ============================================================================== --- xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java (original) +++ xml/security/branches/stax_jsr105/src/com/r_bg/stax/c14n/C14n.java Fri Aug 3 12:15:34 2007 @@ -33,7 +33,7 @@ } static void writeAttribute(XMLStreamReader in, int i, OutputStream os) throws IOException { String result=in.getAttributePrefix(i); - if (result!=null) { + if (result!=null && result.length()!=0) { os.write(result.getBytes()); os.write(':'); } From securitydcarr@example.net Fri Aug 03 19:27:32 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 38306 invoked from network); 3 Aug 2007 19:27:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2007 19:27:32 -0000 Received: (qmail 69253 invoked by uid 500); 3 Aug 2007 19:27:31 -0000 Delivered-To: dcarr@example.net Received: (qmail 69239 invoked by uid 500); 3 Aug 2007 19:27:31 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Received: (qmail 69228 invoked by uid 99); 3 Aug 2007 19:27:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 12:27:31 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 19:27:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3BE5B1A981D; Fri, 3 Aug 2007 12:27:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562552 - /xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Date: Fri, 03 Aug 2007 19:27:11 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: mullan Date: Fri Aug 3 12:27:10 2007 New Revision: 562552 URL: http://svn.apache.org/viewvc?view=rev&rev=562552 Log: Minor fixes/changes. Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java URL: http://svn.apache.org/viewvc/xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java?view=diff&rev=562552&r1=562551&r2=562552 ============================================================================== --- xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java (original) +++ xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Fri Aug 3 12:27:10 2007 @@ -45,39 +45,38 @@ class TransformWorker implements StaxWorker, Transform { - private String algorithm; - public StaxWorker read(XMLStreamReader reader) { - switch (reader.getEventType()) { - - case XMLStreamReader.START_ELEMENT: - if(Constants.DS_URI.equals(reader.getNamespaceURI())) { - String name=reader.getLocalName(); - if (name.equals("Transform") ) { - algorithm=reader.getAttributeValue(null,"Algorithm"); - } - } - break; + private String algorithm; + public StaxWorker read(XMLStreamReader reader) { + switch (reader.getEventType()) { + case XMLStreamReader.START_ELEMENT: + if (Constants.DS_URI.equals(reader.getNamespaceURI())) { + String name=reader.getLocalName(); + if (name.equals("Transform") ) { + algorithm=reader.getAttributeValue(null,"Algorithm"); + } } - return null; - } - public StaxWatcher remove() { - return null; - } - public String getAlgorithm() { - return algorithm; - } - public AlgorithmParameterSpec getParameterSpec() { - return null; - } - public boolean isFeatureSupported(String feature) { - return false; - } - public Data transform(Data data, XMLCryptoContext context) throws TransformException { - throw new UnsupportedOperationException(); - } - public Data transform(Data data, XMLCryptoContext context, OutputStream os) throws TransformException { - throw new UnsupportedOperationException(); + break; } + return null; + } + public StaxWatcher remove() { + return null; + } + public String getAlgorithm() { + return algorithm; + } + public AlgorithmParameterSpec getParameterSpec() { + return null; + } + public boolean isFeatureSupported(String feature) { + return false; + } + public Data transform(Data data, XMLCryptoContext context) throws TransformException { + throw new UnsupportedOperationException(); + } + public Data transform(Data data, XMLCryptoContext context, OutputStream os) throws TransformException { + throw new UnsupportedOperationException(); + } } @@ -145,8 +144,9 @@ return null; } public StaxWatcher remove() { - if (uri != null && !uri.isEmpty()) { + if (uri != null && uri.startsWith("#")) { return new IdWatcher(uri.substring(1),this,os); +// return new IdWatcher(uri.substring(1),this,System.out); } else { return null; } @@ -219,16 +219,13 @@ String name=reader.getLocalName(); if (name.equals("SignedInfo") ) { id=reader.getAttributeValue(null,"Id"); - } - if (name.equals("Reference") ) { + } else if (name.equals("Reference") ) { ReferenceWorker r=new ReferenceWorker(); references.add(r); return r; - } - if (name.equals("SignatureMethod")) { + } else if (name.equals("SignatureMethod")) { signatureMethod=reader.getAttributeValue(null,"Algorithm"); - } - if (name.equals("CanonicalizationMethod")) { + } else if (name.equals("CanonicalizationMethod")) { //TODO: Change c14n. c14nMethod=reader.getAttributeValue(null,"Algorithm"); } @@ -320,6 +317,7 @@ private String id; private byte[] signatureValue; private boolean readSignatureValue=false; + boolean isValid=false; public StaxWorker read(XMLStreamReader reader) { switch (reader.getEventType()) { case XMLStreamReader.START_ELEMENT: @@ -369,7 +367,8 @@ } public boolean validate(XMLValidateContext validateContext) throws XMLSignatureException { - throw new UnsupportedOperationException(); + //FIXME: only returns cached status + return isValid; } } @@ -619,7 +618,7 @@ case XMLStreamReader.START_ELEMENT: if(Constants.DS_URI.equals(reader.getNamespaceURI())) { String name = reader.getLocalName(); - if (name.equals("Object") ) { + if (name.equals("Object")) { id = reader.getAttributeValue(null, "Id"); mimeType = reader.getAttributeValue(null, "MimeType"); encoding = reader.getAttributeValue(null, "Encoding"); @@ -631,6 +630,10 @@ SignaturePropertiesWorker spw = new SignaturePropertiesWorker(); content.add(spw); return spw; + } else if (name.equals("X509Data")) { + X509DataWorker xw = new X509DataWorker(); + content.add(xw); + return xw; } } break; @@ -671,21 +674,17 @@ String name=reader.getLocalName(); if (name.equals("Signature") ) { id=reader.getAttributeValue(null,"Id"); - } - if (name.equals("SignedInfo") ) { + } else if (name.equals("SignedInfo") ) { si=new SignedInfoWorker(); return si; - } - if (name.equals("SignatureValue")) { + } else if (name.equals("SignatureValue")) { sv=new SignatureValueWorker(); return sv; - } - if (name.equals("Object")) { + } else if (name.equals("Object")) { XMLObjectWorker xo=new XMLObjectWorker(); xmlObjects.add(xo); return xo; - } - if (name.equals("KeyInfo")) { + } else if (name.equals("KeyInfo")) { ki=new KeyInfoWorker(); return ki; } @@ -718,7 +717,9 @@ } sa.initVerify(ksr.getKey()); sa.update(si.bos.toByteArray()); - return sa.verify(sv.getValue()); + boolean isSignatureValid = sa.verify(sv.getValue()); + sv.isValid = isSignatureValid; + return isSignatureValid; } catch (org.apache.xml.security.signature.XMLSignatureException e) { throw new XMLSignatureException(e); } From securitydcarr@example.net Fri Aug 03 20:15:27 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 60311 invoked from network); 3 Aug 2007 20:15:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Aug 2007 20:15:08 -0000 Received: (qmail 64135 invoked by uid 500); 3 Aug 2007 20:15:07 -0000 Delivered-To: dcarr@example.net Received: (qmail 64120 invoked by uid 500); 3 Aug 2007 20:15:07 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Received: (qmail 64109 invoked by uid 99); 3 Aug 2007 20:15:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 13:15:07 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 20:15:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2504B1A981A; Fri, 3 Aug 2007 13:14:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562571 - /xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Date: Fri, 03 Aug 2007 20:14:46 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: mullan Date: Fri Aug 3 13:14:45 2007 New Revision: 562571 URL: http://svn.apache.org/viewvc?view=rev&rev=562571 Log: Add KeyValueWorker. Currently parses DSA and RSA keys only. Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java URL: http://svn.apache.org/viewvc/xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java?view=diff&rev=562571&r1=562570&r2=562571 ============================================================================== --- xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java (original) +++ xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Fri Aug 3 13:14:45 2007 @@ -5,11 +5,15 @@ import java.io.OutputStream; import java.io.InputStream; import java.math.BigInteger; +import java.security.KeyException; +import java.security.KeyFactory; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.cert.CertificateFactory; import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.DSAPublicKeySpec; +import java.security.spec.RSAPublicKeySpec; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -372,6 +376,71 @@ } } +class KeyValueWorker implements StaxWorker, KeyValue { + private boolean isDSA = false; + private PublicKey key; + private BigInteger p, q, g, y, mod, exp; + public StaxWorker read(XMLStreamReader reader) { + switch (reader.getEventType()) { + case XMLStreamReader.START_ELEMENT: + if(Constants.DS_URI.equals(reader.getNamespaceURI())) { + try { + String name = reader.getLocalName(); + if (name.equals("DSAKeyValue")) { + isDSA = true; + } else if (name.equals("RSAKeyValue")) { + isDSA = false; + } else if (name.equals("Modulus")) { + mod = new BigInteger(1, Base64.decode(reader.getElementText())); + } else if (name.equals("Exponent")) { + exp = new BigInteger(1, Base64.decode(reader.getElementText())); + } else if (name.equals("P")) { + p = new BigInteger(1, Base64.decode(reader.getElementText())); + } else if (name.equals("Q")) { + q = new BigInteger(1, Base64.decode(reader.getElementText())); + } else if (name.equals("G")) { + g = new BigInteger(1, Base64.decode(reader.getElementText())); + } else if (name.equals("Y")) { + y = new BigInteger(1, Base64.decode(reader.getElementText())); + } + } catch (Base64DecodingException e) { + e.printStackTrace(); + } catch (XMLStreamException e) { + e.printStackTrace(); + } + } + break; + } + return null; + } + + public StaxWatcher remove() { + return null; + } + public PublicKey getPublicKey() throws KeyException { + if (key == null) { + try { + if (isDSA) { + KeyFactory kf = KeyFactory.getInstance("DSA"); + DSAPublicKeySpec spec = new DSAPublicKeySpec(y, p, q, g); + key = kf.generatePublic(spec); + } else { + KeyFactory kf = KeyFactory.getInstance("RSA"); + RSAPublicKeySpec spec = new RSAPublicKeySpec(mod, exp); + key = kf.generatePublic(spec); + } + } catch (Exception e) { + throw new KeyException(e); + } + } + return key; + + } + public boolean isFeatureSupported(String feature) { + return false; + } +} + class X509DataWorker implements StaxWorker, X509Data { private List content = new ArrayList(); private CertificateFactory cf; @@ -468,14 +537,9 @@ xse.printStackTrace(); } } else if (name.equals("KeyValue") ) { - content.add(new KeyValue() { - public PublicKey getPublicKey() { - return null; - } - public boolean isFeatureSupported(String feature) { - return false; - } - }); + KeyValueWorker kv = new KeyValueWorker(); + content.add(kv); + return kv; } else if (name.equals("RetrievalMethod") ) { final String uri = reader.getAttributeValue(null, "URI"); final String type = reader.getAttributeValue(null, "Type"); From securitydcarr@example.net Fri Aug 10 19:16:42 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 60915 invoked from network); 10 Aug 2007 19:16:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Aug 2007 19:16:42 -0000 Received: (qmail 58369 invoked by uid 500); 10 Aug 2007 19:16:41 -0000 Delivered-To: dcarr@example.net Received: (qmail 58352 invoked by uid 500); 10 Aug 2007 19:16:41 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Received: (qmail 58339 invoked by uid 99); 10 Aug 2007 19:16:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 12:16:40 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 19:16:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5BDDA1A981A; Fri, 10 Aug 2007 12:16:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r564723 - /xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Date: Fri, 10 Aug 2007 19:16:20 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: mullan Date: Fri Aug 10 12:16:18 2007 New Revision: 564723 URL: http://svn.apache.org/viewvc?view=rev&rev=564723 Log: Fix bug - was not correctly parsing base64 encoded signature values spanning more than one line (such as RSA). Also implemented SignedInfo.getCanonicalizedData, useful for debugging. Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Modified: xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java URL: http://svn.apache.org/viewvc/xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java?view=diff&rev=564723&r1=564722&r2=564723 ============================================================================== --- xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java (original) +++ xml/security/branches/stax_jsr105/src/com/r_bg/stax/XMLSignatureWorker.java Fri Aug 10 12:16:18 2007 @@ -75,10 +75,12 @@ public boolean isFeatureSupported(String feature) { return false; } - public Data transform(Data data, XMLCryptoContext context) throws TransformException { + public Data transform(Data data, XMLCryptoContext context) + throws TransformException { throw new UnsupportedOperationException(); } - public Data transform(Data data, XMLCryptoContext context, OutputStream os) throws TransformException { + public Data transform(Data data, XMLCryptoContext context, OutputStream os) + throws TransformException { throw new UnsupportedOperationException(); } } @@ -212,8 +214,10 @@ class SignedInfoWorker implements StaxWorker, SignedInfo, DigestResultListener { ByteArrayOutputStream bos=new ByteArrayOutputStream(); + byte[] canonData; boolean initial=true; C14nWorker c14n=new C14nWorker(this,bos); +// C14nWorker c14n=new C14nWorker(this,System.out); List<ReferenceWorker> references=new ArrayList<ReferenceWorker>(); String signatureMethod; String c14nMethod; @@ -243,6 +247,7 @@ } public StaxWatcher remove() { + canonData = bos.toByteArray(); return null; } @@ -289,8 +294,7 @@ } public InputStream getCanonicalizedData() { - // TODO Auto-generated method stub - return null; + return new ByteArrayInputStream(canonData); } public boolean isFeatureSupported(String feature) { @@ -320,7 +324,6 @@ class SignatureValueWorker implements StaxWorker,XMLSignature.SignatureValue { private String id; private byte[] signatureValue; - private boolean readSignatureValue=false; boolean isValid=false; public StaxWorker read(XMLStreamReader reader) { switch (reader.getEventType()) { @@ -329,27 +332,17 @@ String name=reader.getLocalName(); if (name.equals("SignatureValue") ) { id=reader.getAttributeValue(null,"Id"); - readSignatureValue=true; + try { + signatureValue=Base64.decode(reader.getElementText()); + } catch (Base64DecodingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (XMLStreamException e) { + e.printStackTrace(); + } } } break; - case XMLStreamReader.END_ELEMENT: - if (Constants.DS_URI.equals(reader.getNamespaceURI())) { - if (reader.getLocalName().equals("SignatureValue")) { - readSignatureValue=false; - } - } - break; - case XMLStreamReader.CHARACTERS: - if (readSignatureValue) { - try { - signatureValue=Base64.decode(reader.getText()); - } catch (Base64DecodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - break; } return null; } @@ -780,7 +773,7 @@ throw new XMLSignatureException(kse); } sa.initVerify(ksr.getKey()); - sa.update(si.bos.toByteArray()); + sa.update(si.canonData); boolean isSignatureValid = sa.verify(sv.getValue()); sv.isValid = isSignatureValid; return isSignatureValid; From securitydcarr@example.net Thu Aug 16 10:06:58 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 2404 invoked from network); 16 Aug 2007 10:06:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Aug 2007 10:06:58 -0000 Received: (qmail 30520 invoked by uid 500); 16 Aug 2007 10:06:56 -0000 Delivered-To: dcarr@example.net Received: (qmail 30506 invoked by uid 500); 16 Aug 2007 10:06:56 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Delivered-To: moderator for dcarr@example.net Received: (qmail 70535 invoked by uid 99); 15 Aug 2007 18:02:05 -0000 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r566282 - /xml/security/trunk/c/m4/acx_pthread.m4 Date: Wed, 15 Aug 2007 18:01:40 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: scantor Date: Wed Aug 15 11:01:39 2007 New Revision: 566282 URL: http://svn.apache.org/viewvc?view=rev&rev=566282 Log: Update to recent pthread autotools macros. Modified: xml/security/trunk/c/m4/acx_pthread.m4 Modified: xml/security/trunk/c/m4/acx_pthread.m4 URL: http://svn.apache.org/viewvc/xml/security/trunk/c/m4/acx_pthread.m4?view=diff&rev=566282&r1=566281&r2=566282 ============================================================================== --- xml/security/trunk/c/m4/acx_pthread.m4 (original) +++ xml/security/trunk/c/m4/acx_pthread.m4 Wed Aug 15 11:01:39 2007 @@ -1,50 +1,88 @@ -dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl @summary figure out how to build C programs using POSIX threads -dnl @category InstalledPackages -dnl -dnl This macro figures out how to build C programs using POSIX -dnl threads. It sets the PTHREAD_LIBS output variable to the threads -dnl library and linker flags, and the PTHREAD_CFLAGS output variable -dnl to any special C compiler flags that are needed. (The user can also -dnl force certain compiler flags/libs to be tested by setting these -dnl environment variables.) -dnl -dnl Also sets PTHREAD_CC to any special C compiler that is needed for -dnl multi-threaded programs (defaults to the value of CC otherwise). -dnl (This is necessary on AIX to use the special cc_r compiler alias.) -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. e.g. you should link -dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -dnl -dnl If you are only building threads programs, you may wish to -dnl use these variables in your default LIBS, CFLAGS, and CC: -dnl -dnl LIBS="$PTHREAD_LIBS $LIBS" -dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -dnl CC="$PTHREAD_CC" -dnl -dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute -dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE -dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if a threads -dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands -dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, -dnl the default action will define HAVE_PTHREAD. -dnl -dnl Please let the authors know if this macro fails on any platform, -dnl or if you have any other suggestions or comments. This macro was -dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org) -dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread -dnl macros posted by Alejandro Forero Cuervo to the autoconf macro -dnl repository. We are also grateful for the helpful feedback of -dnl numerous users. -dnl -dnl @version 2005-06-15 -dnl @license GPLWithACException -dnl @author Steven G. Johnson <dcarr@example.net> -dnl (license info is here: http://ac-archive.sourceforge.net/doc/copyright.html) +##### http://autoconf-archive.cryp.to/acx_pthread.html +# +# SYNOPSIS +# +# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. +# It sets the PTHREAD_LIBS output variable to the threads library and +# linker flags, and the PTHREAD_CFLAGS output variable to any special +# C compiler flags that are needed. (The user can also force certain +# compiler flags/libs to be tested by setting these environment +# variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). +# (This is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these +# flags, but also link it with them as well. e.g. you should link +# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS +# $LIBS +# +# If you are only building threads programs, you may wish to use +# these variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute +# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to +# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads +# library is found, and ACTION-IF-NOT-FOUND is a list of commands to +# run it if it is not found. If ACTION-IF-FOUND is not specified, the +# default action will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or +# if you have any other suggestions or comments. This macro was based +# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) +# (with help from M. Frigo), as well as ac_pthread and hb_pthread +# macros posted by Alejandro Forero Cuervo to the autoconf macro +# repository. We are also grateful for the helpful feedback of +# numerous users. +# +# LAST MODIFICATION +# +# 2006-05-29 +# +# COPYLEFT +# +# Copyright (c) 2006 Steven G. Johnson <dcarr@example.net> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# As a special exception, the respective Autoconf Macro's copyright +# owner gives unlimited permission to copy, distribute and modify the +# configure scripts that are the output of Autoconf when processing +# the Macro. You need not follow the terms of the GNU General Public +# License when using or distributing such scripts, even though +# portions of the text of the Macro appear in them. The GNU General +# Public License (GPL) does govern all other use of the material that +# constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the +# Autoconf Macro released by the Autoconf Macro Archive. When you +# make and distribute a modified version of the Autoconf Macro, you +# may extend this special exception to the GPL to apply to your +# modified version as well. AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -85,7 +123,7 @@ # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config" +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -102,6 +140,7 @@ # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) @@ -111,13 +150,13 @@ # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: - acx_pthread_flags="-mt -pthreads pthread -pthread $acx_pthread_flags" + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac @@ -215,8 +254,12 @@ LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with cc_r - AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) + else + PTHREAD_CC=$CC + fi else PTHREAD_CC="$CC" fi From securitydcarr@example.net Thu Aug 16 10:07:03 2007 Return-Path: <securitydcarr@example.net> Delivered-To: dcarr@example.net Received: (qmail 2444 invoked from network); 16 Aug 2007 10:07:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 16 Aug 2007 10:07:02 -0000 Received: (qmail 30575 invoked by uid 500); 16 Aug 2007 10:07:00 -0000 Delivered-To: dcarr@example.net Received: (qmail 30563 invoked by uid 500); 16 Aug 2007 10:07:00 -0000 Mailing-List: contact dcarr@example.net; run by ezmlm Precedence: bulk List-Post: <mailto:dcarr@example.net> List-Help: <mailto:dcarr@example.net> List-Unsubscribe: <mailto:dcarr@example.net> List-Id: <security-cvs.xml.apache.org> Delivered-To: mailing list dcarr@example.net Delivered-To: moderator for dcarr@example.net Received: (qmail 61472 invoked by uid 99); 15 Aug 2007 18:52:26 -0000 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r566299 [2/2] - in /xml/security/trunk/c: ./ Projects/VC6.0/xsec/xsec_lib/ Projects/VC7.0/xsec/xsec_lib/ Projects/VC8.0/xsec/xsec_lib/ include/ src/dsig/ src/enc/ src/enc/NSS/ src/enc/OpenSSL/ src/enc/WinCAPI/ src/framework/ src/utils/ src/... Date: Wed, 15 Aug 2007 18:51:52 -0000 To: dcarr@example.net From: dcarr@example.net X-Mailer: svnmailer-1.1.0 Message-Id: <dcarr@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Modified: xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp (original) +++ xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoSymmetricKey.hpp Wed Aug 15 11:51:47 2007 @@ -86,7 +86,7 @@ * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName(); + virtual const XMLCh * getProviderName() const; /** * \brief Clone the key @@ -96,7 +96,7 @@ * duplicate keys. */ - virtual XSECCryptoKey * clone(); + virtual XSECCryptoKey * clone() const; //@} @@ -111,7 +111,7 @@ * particular key */ - SymmetricKeyType getSymmetricKeyType(void); + SymmetricKeyType getSymmetricKeyType(void) const; /** * \brief Set the key from the provided bytes @@ -275,6 +275,12 @@ */ EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) {return &m_ctx;} + + /** + * \brief Get OpenSSL cipher context structure + */ + + const EVP_CIPHER_CTX * getOpenSSLEVP_CIPHER_CTX(void) const {return &m_ctx;} //@} Modified: xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.cpp (original) +++ xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.cpp Wed Aug 15 11:51:47 2007 @@ -163,13 +163,13 @@ // Info functions -const XMLCh * OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() { +const XMLCh * OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() const { return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVOpenSSL; } -XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getPublicKeyType() { +XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getPublicKeyType() const { if (mp_X509 == NULL) { throw XSECCryptoException(XSECCryptoException888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4X509Error, @@ -213,7 +213,7 @@ // Get functions -XSECCryptoKey * OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clonePublicKey() { +XSECCryptoKey * OpenSSLCryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clonePublicKey() const { if (mp_X509 == NULL) { throw XSECCryptoException(XSECCryptoException888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4X509Error, Modified: xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.hpp (original) +++ xml/security/trunk/c/src/enc/OpenSSL/OpenSSLCryptoX509.hpp Wed Aug 15 11:51:47 2007 @@ -68,13 +68,13 @@ * */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType(); + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType() const; /** * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName(); + virtual const XMLCh * getProviderName() const; /** * \brief Get a copy of the public key. @@ -84,7 +84,7 @@ * */ - virtual XSECCryptoKey * clonePublicKey(); + virtual XSECCryptoKey * clonePublicKey() const; //@} @@ -110,6 +110,14 @@ virtual safeBuffer &getDEREncodingSB(void) {return m_DERX509;} + /** + * \brief Get a Base64 DER encoded copy of the certificate + * + * @returns A safeBuffer containing the DER encoded certificate + */ + + virtual const safeBuffer &getDEREncodingSB(void) const {return m_DERX509;} + //@} /** @name OpenSSL Library Specific functions */ @@ -128,6 +136,12 @@ */ X509 * getOpenSSLX509(void) {return mp_X509;} + + /** + * \brief Get OpenSSL certificate structure + */ + + const X509 * getOpenSSLX509(void) const {return mp_X509;} //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.cpp Wed Aug 15 11:51:47 2007 @@ -149,7 +149,7 @@ // Get information -XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType WinCAPICryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getHashType(void) { +XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType WinCAPICryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getHashType(void) const { return m_hashType; // This could be any kind of hash Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHash.hpp Wed Aug 15 11:51:47 2007 @@ -146,7 +146,7 @@ * @returns The hash type */ - virtual HashType getHashType(void); + virtual HashType getHashType(void) const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.cpp Wed Aug 15 11:51:47 2007 @@ -407,7 +407,7 @@ // Get information -XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType WinCAPICryptoHashHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getHashType(void) { +XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType WinCAPICryptoHashHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getHashType(void) const { return m_hashType; // This could be any kind of hash Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoHashHMAC.hpp Wed Aug 15 11:51:47 2007 @@ -159,7 +159,7 @@ * @returns The hash type */ - virtual HashType getHashType(void); + virtual HashType getHashType(void) const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.cpp Wed Aug 15 11:51:47 2007 @@ -109,7 +109,7 @@ // Generic key functions -XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoKeyDS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKeyType() { +XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoKeyDS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKeyType() const { // Find out what we have if (m_key == NULL) { @@ -507,7 +507,7 @@ // -------------------------------------------------------------------------------- -XSECCryptoKey * WinCAPICryptoKeyDS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() { +XSECCryptoKey * WinCAPICryptoKeyDS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() const { WinCAPICryptoKeyDSA * ret; Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyDSA.hpp Wed Aug 15 11:51:47 2007 @@ -114,19 +114,19 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType(); + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const; /** *\brief Return the WiNCAPI string identifier */ - virtual const XMLCh * getProviderName() {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} + virtual const XMLCh * getProviderName() const {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone(); + virtual XSECCryptoKey * clone() const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.cpp Wed Aug 15 11:51:47 2007 @@ -47,14 +47,14 @@ } -unsigned int WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKey(safeBuffer &outBuf) { +unsigned int WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKey(safeBuffer &outBuf) const { outBuf = m_keyBuf; return m_keyLen; } -XSECCryptoKey * WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() { +XSECCryptoKey * WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() const { WinCAPICryptoKeyHMAC * ret; @@ -102,13 +102,13 @@ } -HCRYPTKEY WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getWinKey(void) { +HCRYPTKEY WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getWinKey(void) const { return m_k; } -HCRYPTPROV WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getWinKeyProv(void) { +HCRYPTPROV WinCAPICryptoKeyHM888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getWinKeyProv(void) const { return m_p; Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyHMAC.hpp Wed Aug 15 11:51:47 2007 @@ -89,19 +89,19 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() {return KEY_HMAC;} + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const {return KEY_HMAC;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone(); + virtual XSECCryptoKey * clone() const ; /** * \brief Return the WinCAPI string identifier */ - virtual const XMLCh * getProviderName() {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} + virtual const XMLCh * getProviderName() const {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} //@} @@ -132,7 +132,7 @@ * @returns number of bytes copied in */ - virtual unsigned int getKey(safeBuffer &outBuf); + virtual unsigned int getKey(safeBuffer &outBuf) const; //@} @@ -160,7 +160,7 @@ * @returns The key to use or 0 if this object does not hold one */ - HCRYPTKEY getWinKey(void); + HCRYPTKEY getWinKey(void) const; /** * \brief Get a windows key provider @@ -171,7 +171,7 @@ * @returns The key to use or 0 if this object does not hold one */ - HCRYPTPROV getWinKeyProv(void); + HCRYPTPROV getWinKeyProv(void) const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.cpp Wed Aug 15 11:51:47 2007 @@ -112,7 +112,7 @@ // Generic key functions -XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKeyType() { +XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getKeyType() const { // Find out what we have if (m_key == 0) { @@ -148,13 +148,13 @@ } -unsigned int WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getOAEPparamsLen(void) { +unsigned int WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getOAEPparamsLen(void) const { return 0; } -const unsigned char * WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getOAEPparams(void) { +const unsigned char * WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getOAEPparams(void) const { return NULL; @@ -498,7 +498,7 @@ } -XSECCryptoKey * WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() { +XSECCryptoKey * WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clone() const { WinCAPICryptoKeyRSA * ret; @@ -703,7 +703,7 @@ // Size in bytes // -------------------------------------------------------------------------------- -unsigned int WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLength(void) { +unsigned int WinCAPICryptoKeyRS888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getLength(void) const { DWORD len; DWORD pLen = 4; Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoKeyRSA.hpp Wed Aug 15 11:51:47 2007 @@ -110,19 +110,19 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType(); + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const; /** * \brief Return the WinCAPI identifier string */ - virtual const XMLCh * getProviderName() {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} + virtual const XMLCh * getProviderName() const {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone(); + virtual XSECCryptoKey * clone() const; //@} @@ -159,7 +159,7 @@ * the ability to set OAEP parameters, so this will always return 0 */ - virtual unsigned int getOAEPparamsLen(void); + virtual unsigned int getOAEPparamsLen(void) const; /** * \brief Get the OAEPparams @@ -170,7 +170,7 @@ * the ability to set OAEP parameters, so this will always return NULL */ - virtual const unsigned char * getOAEPparams(void); + virtual const unsigned char * getOAEPparams(void) const; /** * \brief Verify a SHA1 PKCS1 encoded signature @@ -267,7 +267,7 @@ * @returns The length of the rsa key (in bytes) */ - virtual unsigned int getLength(void); + virtual unsigned int getLength(void) const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp Wed Aug 15 11:51:47 2007 @@ -163,7 +163,7 @@ } -const XMLCh * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() { +const XMLCh * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() const { return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI; @@ -172,7 +172,7 @@ // Hashing classes -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashSHA1() { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashSHA1() const { WinCAPICryptoHash * ret; @@ -182,7 +182,7 @@ } -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACSHA1() { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACSHA1() const { WinCAPICryptoHashHMAC * ret; @@ -192,7 +192,7 @@ } -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashSHA(int length) { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashSHA(int length) const { if (length == 160) @@ -201,7 +201,7 @@ else return NULL; } -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACSHA(int length) { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACSHA(int length) const { if (length == 160) return hashHMACSHA1(); @@ -210,7 +210,7 @@ } -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashMD5() { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashMD5() const { WinCAPICryptoHash * ret; @@ -220,7 +220,7 @@ } -XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACMD5() { +XSECCryptoHash * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4hashHMACMD5() const { WinCAPICryptoHashHMAC * ret; @@ -230,7 +230,7 @@ } -XSECCryptoKeyHMAC * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyHMAC(void) { +XSECCryptoKeyHMAC * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyHMAC(void) const { WinCAPICryptoKeyHMAC * ret; XSECnew(ret, WinCAPICryptoKeyHMAC(m_provDSS)); @@ -240,7 +240,7 @@ } -XSECCryptoKeyDSA * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyDSA() { +XSECCryptoKeyDSA * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyDSA() const { WinCAPICryptoKeyDSA * ret; @@ -250,7 +250,7 @@ } -XSECCryptoKeyRSA * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyRSA() { +XSECCryptoKeyRSA * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keyRSA() const { WinCAPICryptoKeyRSA * ret; @@ -261,7 +261,7 @@ } -XSECCryptoX509 * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4X509() { +XSECCryptoX509 * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4X509() const { WinCAPICryptoX509 * ret; @@ -271,7 +271,7 @@ } -XSECCryptoBase64 * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4se64() { +XSECCryptoBase64 * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4se64() const { // The Windows CAPI does not provide a Base64 decoder/encoder. // Use the internal implementation. @@ -284,7 +284,7 @@ } -bool WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lgorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) { +bool WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lgorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const { switch (alg) { @@ -308,7 +308,7 @@ } -bool WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lgorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg) { +bool WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lgorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg) const { switch (alg) { @@ -332,7 +332,7 @@ } -XSECCryptoSymmetricKey * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) { +XSECCryptoSymmetricKey * WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const { // Only temporary @@ -344,7 +344,7 @@ } -unsigned int WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getRandom(unsigned char * buffer, unsigned int numOctets) { +unsigned int WinCAPICryptoProvider888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getRandom(unsigned char * buffer, unsigned int numOctets) const { if (!CryptGenRandom(m_provApacheKeyStore, numOctets, buffer)) { throw XSECException(XSECException888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4InternalError, Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoProvider.hpp Wed Aug 15 11:51:47 2007 @@ -123,7 +123,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashSHA1(); + virtual XSECCryptoHash * hashSHA1() const; /** * \brief Return a SHA implementation. @@ -136,7 +136,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashSHA(int length = 160); + virtual XSECCryptoHash * hashSHA(int length = 160) const; /** * \brief Return a HMAC SHA1 implementation. @@ -149,7 +149,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashHMACSHA1(); + virtual XSECCryptoHash * hashHMACSHA1() const; /** * \brief Return a HMAC SHA(1-512) implementation. @@ -163,7 +163,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashHMACSHA(int length = 160); + virtual XSECCryptoHash * hashHMACSHA(int length = 160) const; /** * \brief Return a MD5 implementation. @@ -175,7 +175,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashMD5(); + virtual XSECCryptoHash * hashMD5() const; /** * \brief Return a HMAC MD5 implementation. @@ -193,7 +193,7 @@ * @see WinCAPICryptoHash */ - virtual XSECCryptoHash * hashHMACMD5(); + virtual XSECCryptoHash * hashHMACMD5() const; /** * \brief Return a HMAC key @@ -205,7 +205,7 @@ * a value set within it. */ - virtual XSECCryptoKeyHMAC * keyHMAC(void); + virtual XSECCryptoKeyHMAC * keyHMAC(void) const; //@} @@ -226,7 +226,7 @@ * @see XSCryptCryptoBase64 */ - virtual XSECCryptoBase64 * base64(); + virtual XSECCryptoBase64 * base64() const; //@} @@ -242,7 +242,7 @@ * @see WinCAPICryptoKeyDSA */ - virtual XSECCryptoKeyDSA * keyDSA(); + virtual XSECCryptoKeyDSA * keyDSA() const; /** * \brief Return an RSA key implementation object. @@ -253,7 +253,7 @@ * @see WinCAPICryptoKeyRSA */ - virtual XSECCryptoKeyRSA * keyRSA(); + virtual XSECCryptoKeyRSA * keyRSA() const; /** * \brief Return an X509 implementation object. @@ -265,7 +265,7 @@ * @see WinCAPICryptoX509 */ - virtual XSECCryptoX509 * X509(); + virtual XSECCryptoX509 * X509() const; //@} @@ -325,7 +325,7 @@ * symmetric algorithm is supported */ - virtual bool algorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg); + virtual bool algorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const; /** * \brief Determine whether a given algorithm is supported @@ -334,7 +334,7 @@ * digest algorithm is supported */ - virtual bool algorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg); + virtual bool algorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg) const; /** * \brief Return a Symmetric Key implementation object. @@ -346,7 +346,7 @@ * @see XSECCryptoSymmetricKey */ - virtual XSECCryptoSymmetricKey * keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg); + virtual XSECCryptoSymmetricKey * keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const; /** * \brief Obtain some random octets @@ -360,7 +360,7 @@ * @returns Number of bytes obtained. */ - virtual unsigned int getRandom(unsigned char * buffer, unsigned int numOctets); + virtual unsigned int getRandom(unsigned char * buffer, unsigned int numOctets) const; //@} @@ -372,7 +372,7 @@ * \brief Returns a string that identifies the Crypto Provider */ - virtual const XMLCh * getProviderName(); + virtual const XMLCh * getProviderName() const; //@} Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.cpp Wed Aug 15 11:51:47 2007 @@ -66,19 +66,7 @@ // Basic Key interface methods // -------------------------------------------------------------------------------- -XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType WinCAPICryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getSymmetricKeyType() { - - return m_keyType; - -} - -const XMLCh * WinCAPICryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() { - - return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI; - -} - -XSECCryptoKey * WinCAPICryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lone() { +XSECCryptoKey * WinCAPICryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4lone() const { WinCAPICryptoSymmetricKey * ret; Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoSymmetricKey.hpp Wed Aug 15 11:51:47 2007 @@ -93,7 +93,7 @@ * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName(); + virtual const XMLCh * getProviderName() const {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} /** * \brief Clone the key @@ -103,7 +103,7 @@ * duplicate keys. */ - virtual XSECCryptoKey * clone(); + virtual XSECCryptoKey * clone() const; //@} @@ -118,7 +118,7 @@ * particular key */ - SymmetricKeyType getSymmetricKeyType(void); + SymmetricKeyType getSymmetricKeyType(void) const {return m_keyType;} /** * \brief Set the key from the provided bytes Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.cpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.cpp Wed Aug 15 11:51:47 2007 @@ -119,13 +119,7 @@ // Info functions -const XMLCh * WinCAPICryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getProviderName() { - - return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI; - -} - -XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getPublicKeyType() { +XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType WinCAPICryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4getPublicKeyType() const { if (mp_certContext == NULL) { throw XSECCryptoException(XSECCryptoException888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4X509Error, @@ -144,7 +138,7 @@ // Get functions -XSECCryptoKey * WinCAPICryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clonePublicKey() { +XSECCryptoKey * WinCAPICryptoX888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4clonePublicKey() const { if (mp_certContext == NULL) { Modified: xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.hpp (original) +++ xml/security/trunk/c/src/enc/WinCAPI/WinCAPICryptoX509.hpp Wed Aug 15 11:51:47 2007 @@ -94,7 +94,7 @@ * */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType(); + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType() const; /** * \brief Get a copy of the public key. @@ -104,13 +104,13 @@ * */ - virtual XSECCryptoKey * clonePublicKey(); + virtual XSECCryptoKey * clonePublicKey() const; /** * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName(); + virtual const XMLCh * getProviderName() const {return DSIGConstants888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4s_unicodeStrPROVWinCAPI;} //@} @@ -135,6 +135,14 @@ */ virtual safeBuffer &getDEREncodingSB(void) {return m_DERX509;} + + /** + * \brief Get a Base64 DER encoded copy of the certificate + * + * @returns A safeBuffer containing the DER encoded certificate + */ + + virtual const safeBuffer &getDEREncodingSB(void) const {return m_DERX509;} //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoHash.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoHash.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoHash.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoHash.hpp Wed Aug 15 11:51:47 2007 @@ -135,7 +135,7 @@ * @returns The hash type */ - virtual HashType getHashType(void) = 0; + virtual HashType getHashType(void) const = 0; //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoKey.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoKey.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoKey.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoKey.hpp Wed Aug 15 11:51:47 2007 @@ -102,13 +102,13 @@ * \brief Returns the type of this key. */ - virtual KeyType getKeyType() {return KEY_NONE;} + virtual KeyType getKeyType() const {return KEY_NONE;} /** * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName() = 0; + virtual const XMLCh * getProviderName() const = 0; /** * \brief Clone the key @@ -118,7 +118,7 @@ * duplicate keys. */ - virtual XSECCryptoKey * clone() = 0; + virtual XSECCryptoKey * clone() const = 0; //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoKeyDSA.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoKeyDSA.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoKeyDSA.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoKeyDSA.hpp Wed Aug 15 11:51:47 2007 @@ -62,13 +62,13 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() {return KEY_NONE;} + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const {return KEY_NONE;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone() = 0; + virtual XSECCryptoKey * clone() const = 0; //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoKeyHMAC.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoKeyHMAC.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoKeyHMAC.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoKeyHMAC.hpp Wed Aug 15 11:51:47 2007 @@ -63,13 +63,13 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() {return KEY_HMAC;} + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const {return KEY_HMAC;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone() = 0; + virtual XSECCryptoKey * clone() const = 0; //@} @@ -105,7 +105,7 @@ * @returns number of bytes copied in */ - virtual unsigned int getKey(safeBuffer &outBuf) = 0; + virtual unsigned int getKey(safeBuffer &outBuf) const = 0; //@} }; Modified: xml/security/trunk/c/src/enc/XSECCryptoKeyRSA.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoKeyRSA.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoKeyRSA.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoKeyRSA.hpp Wed Aug 15 11:51:47 2007 @@ -77,13 +77,13 @@ * public key, private key or a key pair */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() {return KEY_NONE;} + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getKeyType() const {return KEY_NONE;} /** * \brief Replicate key */ - virtual XSECCryptoKey * clone() = 0; + virtual XSECCryptoKey * clone() const = 0; //@} @@ -114,7 +114,7 @@ * @returns the number of bytes of the OAEPparams buffer (assuming it has been set) */ - virtual unsigned int getOAEPparamsLen(void) = 0; + virtual unsigned int getOAEPparamsLen(void) const = 0; /** * \brief Get the OAEPparams @@ -123,7 +123,7 @@ * or NULL if no params are held */ - virtual const unsigned char * getOAEPparams(void) = 0; + virtual const unsigned char * getOAEPparams(void) const = 0; /** * \brief Verify a SHA1 PKCS1 encoded signature @@ -223,7 +223,7 @@ * @returns The length of the rsa key (in bytes) */ - virtual unsigned int getLength(void) = 0; + virtual unsigned int getLength(void) const = 0; //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoProvider.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoProvider.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoProvider.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoProvider.hpp Wed Aug 15 11:51:47 2007 @@ -160,7 +160,7 @@ * @deprecated Use hashSHA instead */ - virtual XSECCryptoHash * hashSHA1() = 0; + virtual XSECCryptoHash * hashSHA1() const = 0; /** * \brief Return a SHA implementation. @@ -173,7 +173,7 @@ * @see XSECCryptoHash */ - virtual XSECCryptoHash * hashSHA(int length = 160) = 0; + virtual XSECCryptoHash * hashSHA(int length = 160) const = 0; /** * \brief Return a HMAC SHA1 implementation. @@ -187,7 +187,7 @@ * @deprecated use hashHMACSHA instead */ - virtual XSECCryptoHash * hashHMACSHA1() = 0; + virtual XSECCryptoHash * hashHMACSHA1() const = 0; /** * \brief Return a HMAC SHA(1-512) implementation. @@ -201,7 +201,7 @@ * @see XSECCryptoHash */ - virtual XSECCryptoHash * hashHMACSHA(int length = 160) = 0; + virtual XSECCryptoHash * hashHMACSHA(int length = 160) const = 0; /** * \brief Return a MD5 implementation. @@ -213,7 +213,7 @@ * @see XSECCryptoHash */ - virtual XSECCryptoHash * hashMD5() = 0; + virtual XSECCryptoHash * hashMD5() const = 0; /** * \brief Return a HMAC MD5 implementation. @@ -231,7 +231,7 @@ * @see XSECCryptoHash */ - virtual XSECCryptoHash * hashHMACMD5() = 0; + virtual XSECCryptoHash * hashHMACMD5() const = 0; /** * \brief Return a HMAC key @@ -243,7 +243,7 @@ * a value set within it. */ - virtual XSECCryptoKeyHMAC * keyHMAC(void) = 0; + virtual XSECCryptoKeyHMAC * keyHMAC() const = 0; //@} @@ -259,7 +259,7 @@ * @see XSECCryptoBase64 */ - virtual XSECCryptoBase64 * base64() = 0; + virtual XSECCryptoBase64 * base64() const = 0; //@} @@ -275,7 +275,7 @@ * @see XSECCryptoKeyDSA */ - virtual XSECCryptoKeyDSA * keyDSA() = 0; + virtual XSECCryptoKeyDSA * keyDSA() const = 0; /** * \brief Return an RSA key implementation object. @@ -286,7 +286,7 @@ * @see XSECCryptoKeyRSA */ - virtual XSECCryptoKeyRSA * keyRSA() = 0; + virtual XSECCryptoKeyRSA * keyRSA() const = 0; /** * \brief Return an X509 implementation object. @@ -298,7 +298,7 @@ * @see XSECCryptoX509 */ - virtual XSECCryptoX509 * X509() = 0; + virtual XSECCryptoX509 * X509() const = 0; /** * \brief Determine whether a given algorithm is supported @@ -307,7 +307,7 @@ * symmetric algorithm is supported */ - virtual bool algorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) = 0; + virtual bool algorithmSupported(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const = 0; /** * \brief Determine whether a given algorithm is supported @@ -316,7 +316,7 @@ * digest algorithm is supported */ - virtual bool algorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg) = 0; + virtual bool algorithmSupported(XSECCryptoHash888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4HashType alg) const = 0; /** * \brief Return a Symmetric Key implementation object. @@ -328,7 +328,7 @@ * @see XSECCryptoSymmetricKey */ - virtual XSECCryptoSymmetricKey * keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) = 0; + virtual XSECCryptoSymmetricKey * keySymmetric(XSECCryptoSymmetricKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4SymmetricKeyType alg) const = 0; /** * \brief Obtain some random octets @@ -342,7 +342,7 @@ * @returns Number of bytes obtained. */ - virtual unsigned int getRandom(unsigned char * buffer, unsigned int numOctets) = 0; + virtual unsigned int getRandom(unsigned char * buffer, unsigned int numOctets) const = 0; //@} @@ -353,7 +353,7 @@ * \brief Returns a string that identifies the Crypto Provider */ - virtual const XMLCh * getProviderName() = 0; + virtual const XMLCh * getProviderName() const = 0; //@} Modified: xml/security/trunk/c/src/enc/XSECCryptoSymmetricKey.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoSymmetricKey.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoSymmetricKey.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoSymmetricKey.hpp Wed Aug 15 11:51:47 2007 @@ -106,13 +106,13 @@ * \brief Returns the type of this key. */ - virtual KeyType getKeyType() {return KEY_SYMMETRIC;} + virtual KeyType getKeyType() const {return KEY_SYMMETRIC;} /** * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName() = 0; + virtual const XMLCh * getProviderName() const = 0; /** * \brief Clone the key @@ -122,7 +122,7 @@ * duplicate keys. */ - virtual XSECCryptoKey * clone() = 0; + virtual XSECCryptoKey * clone() const = 0; //@} @@ -137,7 +137,7 @@ * particular key */ - virtual SymmetricKeyType getSymmetricKeyType(void) = 0; + virtual SymmetricKeyType getSymmetricKeyType(void) const = 0; /** * \brief Set the key from the provided bytes Modified: xml/security/trunk/c/src/enc/XSECCryptoX509.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/enc/XSECCryptoX509.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/enc/XSECCryptoX509.hpp (original) +++ xml/security/trunk/c/src/enc/XSECCryptoX509.hpp Wed Aug 15 11:51:47 2007 @@ -68,7 +68,7 @@ * */ - virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType() = 0; + virtual XSECCryptoKey888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KeyType getPublicKeyType() const = 0; /** * \brief Get a copy of the public key. @@ -78,13 +78,13 @@ * */ - virtual XSECCryptoKey * clonePublicKey() = 0; + virtual XSECCryptoKey * clonePublicKey() const = 0; /** * \brief Returns a string that identifies the crypto owner of this library. */ - virtual const XMLCh * getProviderName() = 0; + virtual const XMLCh * getProviderName() const = 0; //@} @@ -121,6 +121,14 @@ */ virtual safeBuffer &getDEREncodingSB(void) = 0; // Get the DER string + + /** + * \brief Get a Base64 DER encoded copy of the certificate + * + * @returns A safeBuffer containing the DER encoded certificate + */ + + virtual const safeBuffer &getDEREncodingSB(void) const = 0; // Get the DER string //@} Modified: xml/security/trunk/c/src/framework/XSECW32Config.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/framework/XSECW32Config.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/framework/XSECW32Config.hpp (original) +++ xml/security/trunk/c/src/framework/XSECW32Config.hpp Wed Aug 15 11:51:47 2007 @@ -37,8 +37,8 @@ */ #define XSEC_VERSION_MAJOR 1 -#define XSEC_VERSION_MEDIUM 3 -#define XSEC_VERSION_MINOR 1 +#define XSEC_VERSION_MEDIUM 4 +#define XSEC_VERSION_MINOR 0 /* * Because we don't have a configure script, we need to rely on version Modified: xml/security/trunk/c/src/framework/version.rc URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/framework/version.rc?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/framework/version.rc (original) +++ xml/security/trunk/c/src/framework/version.rc Wed Aug 15 11:51:47 2007 @@ -54,8 +54,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,1,3,1 - PRODUCTVERSION 0,1,3,1 + FILEVERSION 0,1,4,0 + PRODUCTVERSION 0,1,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -73,14 +73,14 @@ VALUE "Comments", "XML Security C++ Library\0" VALUE "CompanyName", "The Apache Software Foundation\0" VALUE "FileDescription", "xsec_1D\0" - VALUE "FileVersion", "0, 1, 3, 1\0" + VALUE "FileVersion", "0, 1, 4, 0\0" VALUE "InternalName", "xsec_1D\0" - VALUE "LegalCopyright", "Copyright © 2002-2006 The Apache Software Foundation\0" + VALUE "LegalCopyright", "Copyright © 2002-2007 The Apache Software Foundation\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "xsec_1D.dll\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "XML-Security-C - C++ XML Security Library\0" - VALUE "ProductVersion", "0, 1, 3, 1\0" + VALUE "ProductVersion", "0, 1, 4, 0\0" VALUE "SpecialBuild", "\0" END END Modified: xml/security/trunk/c/src/utils/XSECSafeBuffer.cpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/utils/XSECSafeBuffer.cpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/utils/XSECSafeBuffer.cpp (original) +++ xml/security/trunk/c/src/utils/XSECSafeBuffer.cpp Wed Aug 15 11:51:47 2007 @@ -542,7 +542,7 @@ // Unicode Functions -const XMLCh * safeBuffer888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4sbStrToXMLCh(void) { +const XMLCh * safeBuffer888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4sbStrToXMLCh(void) const { checkBufferType(BUFFER_CHAR); if (mp_XMLCh != NULL) Modified: xml/security/trunk/c/src/utils/XSECSafeBuffer.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/utils/XSECSafeBuffer.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/utils/XSECSafeBuffer.hpp (original) +++ xml/security/trunk/c/src/utils/XSECSafeBuffer.hpp Wed Aug 15 11:51:47 2007 @@ -135,7 +135,7 @@ void setBufferType(bufferType bt); // Use with care // Unicode (UTF-16 manipulation) - const XMLCh * sbStrToXMLCh(void); // Note does not affect internal buffer + const XMLCh * sbStrToXMLCh(void) const; // Note does not affect internal buffer void sbTranscodeIn(const XMLCh * inStr); // Create a local string from UTF-16 void sbTranscodeIn(const char * inStr); // Create a UTF-16 string from local void sbXMLChIn(const XMLCh * in); // Buffer holds XMLCh * @@ -158,7 +158,7 @@ unsigned char * buffer; unsigned int bufferSize; - XMLCh * mp_XMLCh; + mutable XMLCh * mp_XMLCh; bufferType m_bufferType; // For XMLCh manipulation Modified: xml/security/trunk/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp URL: http://svn.apache.org/viewvc/xml/security/trunk/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp?view=diff&rev=566299&r1=566298&r2=566299 ============================================================================== --- xml/security/trunk/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp (original) +++ xml/security/trunk/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp Wed Aug 15 11:51:47 2007 @@ -57,8 +57,8 @@ const XMLCh * value); // KeyInfo Interface methods - virtual const XMLCh * getKeyName(void) {return NULL;} - virtual keyInfoType getKeyInfoType(void) {return DSIGKeyInfo888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KEYINFO_ENCRYPTEDKEY;} + virtual const XMLCh * getKeyName(void) const {return NULL;} + virtual keyInfoType getKeyInfoType(void) const {return DSIGKeyInfo888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4KEYINFO_ENCRYPTEDKEY;} // Inherited from XENCEncryptedData - need to re-implement Added: xml/security/trunk/c/xml-security-c.spec URL: http://svn.apache.org/viewvc/xml/security/trunk/c/xml-security-c.spec?view=auto&rev=566299 ============================================================================== --- xml/security/trunk/c/xml-security-c.spec (added) +++ xml/security/trunk/c/xml-security-c.spec Wed Aug 15
{'source': 'Apache Software Foundation Public Mail Archives'}