You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by de...@apache.org on 2013/08/11 00:25:21 UTC

svn commit: r874057 [6/31] - in /websites/production/commons/content/sandbox/commons-openpgp: ./ apidocs/ apidocs/org/apache/commons/openpgp/ apidocs/org/apache/commons/openpgp/ant/ apidocs/org/apache/commons/openpgp/ant/class-use/ apidocs/org/apache/c...

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,214 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import org.bouncycastle.bcpg.ArmoredOutputStream;<a name="line.20"></a>
+<FONT color="green">021</FONT>    import org.bouncycastle.bcpg.BCPGOutputStream;<a name="line.21"></a>
+<FONT color="green">022</FONT>    import org.bouncycastle.bcpg.HashAlgorithmTags;<a name="line.22"></a>
+<FONT color="green">023</FONT>    import org.bouncycastle.jce.provider.BouncyCastleProvider;<a name="line.23"></a>
+<FONT color="green">024</FONT>    import org.bouncycastle.openpgp.PGPException;<a name="line.24"></a>
+<FONT color="green">025</FONT>    import org.bouncycastle.openpgp.PGPPrivateKey;<a name="line.25"></a>
+<FONT color="green">026</FONT>    import org.bouncycastle.openpgp.PGPSecretKey;<a name="line.26"></a>
+<FONT color="green">027</FONT>    import org.bouncycastle.openpgp.PGPSignature;<a name="line.27"></a>
+<FONT color="green">028</FONT>    import org.bouncycastle.openpgp.PGPSignatureGenerator;<a name="line.28"></a>
+<FONT color="green">029</FONT>    import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder;<a name="line.29"></a>
+<FONT color="green">030</FONT>    import org.bouncycastle.openpgp.operator.jcajce.JcaPGPDigestCalculatorProviderBuilder;<a name="line.30"></a>
+<FONT color="green">031</FONT>    import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder;<a name="line.31"></a>
+<FONT color="green">032</FONT>    <a name="line.32"></a>
+<FONT color="green">033</FONT>    import java.io.ByteArrayOutputStream;<a name="line.33"></a>
+<FONT color="green">034</FONT>    import java.io.IOException;<a name="line.34"></a>
+<FONT color="green">035</FONT>    import java.io.OutputStream;<a name="line.35"></a>
+<FONT color="green">036</FONT>    import java.security.Security;<a name="line.36"></a>
+<FONT color="green">037</FONT>    import java.security.SignatureException;<a name="line.37"></a>
+<FONT color="green">038</FONT>    <a name="line.38"></a>
+<FONT color="green">039</FONT>    /**<a name="line.39"></a>
+<FONT color="green">040</FONT>     * Bouncy Castle implementation of the OpenPGP signer.<a name="line.40"></a>
+<FONT color="green">041</FONT>     *<a name="line.41"></a>
+<FONT color="green">042</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.42"></a>
+<FONT color="green">043</FONT>     */<a name="line.43"></a>
+<FONT color="green">044</FONT>    public class BouncyCastleOpenPgpStreamingSigner<a name="line.44"></a>
+<FONT color="green">045</FONT>        implements OpenPgpStreamingSigner<a name="line.45"></a>
+<FONT color="green">046</FONT>    {<a name="line.46"></a>
+<FONT color="green">047</FONT>        private static final String PROVIDER = "BC";<a name="line.47"></a>
+<FONT color="green">048</FONT>    <a name="line.48"></a>
+<FONT color="green">049</FONT>        private PGPSignatureGenerator sGen;<a name="line.49"></a>
+<FONT color="green">050</FONT>    <a name="line.50"></a>
+<FONT color="green">051</FONT>        private final ByteArrayOutputStream signatureBytes;<a name="line.51"></a>
+<FONT color="green">052</FONT>    <a name="line.52"></a>
+<FONT color="green">053</FONT>        private BCPGOutputStream bOut;<a name="line.53"></a>
+<FONT color="green">054</FONT>    <a name="line.54"></a>
+<FONT color="green">055</FONT>        public BouncyCastleOpenPgpStreamingSigner( String keyId, KeyRing keyRing, boolean asciiArmor )<a name="line.55"></a>
+<FONT color="green">056</FONT>            throws OpenPgpException<a name="line.56"></a>
+<FONT color="green">057</FONT>        {<a name="line.57"></a>
+<FONT color="green">058</FONT>            signatureBytes = new ByteArrayOutputStream();<a name="line.58"></a>
+<FONT color="green">059</FONT>            init( asciiArmor, signatureBytes, keyRing, keyId );<a name="line.59"></a>
+<FONT color="green">060</FONT>        }<a name="line.60"></a>
+<FONT color="green">061</FONT>    <a name="line.61"></a>
+<FONT color="green">062</FONT>        public BouncyCastleOpenPgpStreamingSigner( OutputStream signature, String keyId, KeyRing keyRing,<a name="line.62"></a>
+<FONT color="green">063</FONT>                                                   boolean asciiArmor )<a name="line.63"></a>
+<FONT color="green">064</FONT>            throws OpenPgpException<a name="line.64"></a>
+<FONT color="green">065</FONT>        {<a name="line.65"></a>
+<FONT color="green">066</FONT>            signatureBytes = null;<a name="line.66"></a>
+<FONT color="green">067</FONT>            init( asciiArmor, signature, keyRing, keyId );<a name="line.67"></a>
+<FONT color="green">068</FONT>        }<a name="line.68"></a>
+<FONT color="green">069</FONT>    <a name="line.69"></a>
+<FONT color="green">070</FONT>        private void init( boolean asciiArmor, OutputStream signature, KeyRing keyRing, String keyId )<a name="line.70"></a>
+<FONT color="green">071</FONT>            throws OpenPgpException<a name="line.71"></a>
+<FONT color="green">072</FONT>        {<a name="line.72"></a>
+<FONT color="green">073</FONT>            // TODO: better location for this?<a name="line.73"></a>
+<FONT color="green">074</FONT>            Security.addProvider( new BouncyCastleProvider() );<a name="line.74"></a>
+<FONT color="green">075</FONT>    <a name="line.75"></a>
+<FONT color="green">076</FONT>            OutputStream out;<a name="line.76"></a>
+<FONT color="green">077</FONT>            if ( asciiArmor )<a name="line.77"></a>
+<FONT color="green">078</FONT>            {<a name="line.78"></a>
+<FONT color="green">079</FONT>                out = new ArmoredOutputStream( signature );<a name="line.79"></a>
+<FONT color="green">080</FONT>            }<a name="line.80"></a>
+<FONT color="green">081</FONT>            else<a name="line.81"></a>
+<FONT color="green">082</FONT>            {<a name="line.82"></a>
+<FONT color="green">083</FONT>                out = signature;<a name="line.83"></a>
+<FONT color="green">084</FONT>            }<a name="line.84"></a>
+<FONT color="green">085</FONT>            bOut = new BCPGOutputStream( out );<a name="line.85"></a>
+<FONT color="green">086</FONT>    <a name="line.86"></a>
+<FONT color="green">087</FONT>            try<a name="line.87"></a>
+<FONT color="green">088</FONT>            {<a name="line.88"></a>
+<FONT color="green">089</FONT>                PGPSecretKey pgpSec = keyRing.getSecretKey( keyId );<a name="line.89"></a>
+<FONT color="green">090</FONT>                if ( pgpSec == null )<a name="line.90"></a>
+<FONT color="green">091</FONT>                {<a name="line.91"></a>
+<FONT color="green">092</FONT>                    throw new OpenPgpException( "The key with id '" + keyId + "' was not found in the secret keyring." );<a name="line.92"></a>
+<FONT color="green">093</FONT>                }<a name="line.93"></a>
+<FONT color="green">094</FONT>                PGPPrivateKey pgpPrivKey = pgpSec.extractPrivateKey(new JcePBESecretKeyDecryptorBuilder(<a name="line.94"></a>
+<FONT color="green">095</FONT>                        new JcaPGPDigestCalculatorProviderBuilder().setProvider(PROVIDER).build()).setProvider(PROVIDER).<a name="line.95"></a>
+<FONT color="green">096</FONT>                        build(keyRing.getPassword()));<a name="line.96"></a>
+<FONT color="green">097</FONT>                sGen = new PGPSignatureGenerator(new JcaPGPContentSignerBuilder(pgpSec.getPublicKey().getAlgorithm(),<a name="line.97"></a>
+<FONT color="green">098</FONT>                        HashAlgorithmTags.SHA1).setProvider(PROVIDER).setDigestProvider(PROVIDER));<a name="line.98"></a>
+<FONT color="green">099</FONT>                sGen.init(PGPSignature.BINARY_DOCUMENT, pgpPrivKey);<a name="line.99"></a>
+<FONT color="green">100</FONT>            }<a name="line.100"></a>
+<FONT color="green">101</FONT>            catch ( PGPException e )<a name="line.101"></a>
+<FONT color="green">102</FONT>            {<a name="line.102"></a>
+<FONT color="green">103</FONT>                // TODO: more details<a name="line.103"></a>
+<FONT color="green">104</FONT>                throw new OpenPgpException( "Error calculating detached signature", e );<a name="line.104"></a>
+<FONT color="green">105</FONT>            }<a name="line.105"></a>
+<FONT color="green">106</FONT>        }<a name="line.106"></a>
+<FONT color="green">107</FONT>    <a name="line.107"></a>
+<FONT color="green">108</FONT>        public void update( byte[] buf )<a name="line.108"></a>
+<FONT color="green">109</FONT>            throws OpenPgpException<a name="line.109"></a>
+<FONT color="green">110</FONT>        {<a name="line.110"></a>
+<FONT color="green">111</FONT>            update( buf, 0, buf.length );<a name="line.111"></a>
+<FONT color="green">112</FONT>        }<a name="line.112"></a>
+<FONT color="green">113</FONT>    <a name="line.113"></a>
+<FONT color="green">114</FONT>        public void update( byte[] buf, int offset, int length )<a name="line.114"></a>
+<FONT color="green">115</FONT>            throws OpenPgpException<a name="line.115"></a>
+<FONT color="green">116</FONT>        {<a name="line.116"></a>
+<FONT color="green">117</FONT>            try<a name="line.117"></a>
+<FONT color="green">118</FONT>            {<a name="line.118"></a>
+<FONT color="green">119</FONT>                sGen.update( buf, offset, length );<a name="line.119"></a>
+<FONT color="green">120</FONT>            }<a name="line.120"></a>
+<FONT color="green">121</FONT>            catch ( SignatureException e )<a name="line.121"></a>
+<FONT color="green">122</FONT>            {<a name="line.122"></a>
+<FONT color="green">123</FONT>                // TODO: more details<a name="line.123"></a>
+<FONT color="green">124</FONT>                throw new OpenPgpException( "Error calculating detached signature", e );<a name="line.124"></a>
+<FONT color="green">125</FONT>            }<a name="line.125"></a>
+<FONT color="green">126</FONT>        }<a name="line.126"></a>
+<FONT color="green">127</FONT>    <a name="line.127"></a>
+<FONT color="green">128</FONT>        public byte[] finish()<a name="line.128"></a>
+<FONT color="green">129</FONT>            throws OpenPgpException, IOException<a name="line.129"></a>
+<FONT color="green">130</FONT>        {<a name="line.130"></a>
+<FONT color="green">131</FONT>            try<a name="line.131"></a>
+<FONT color="green">132</FONT>            {<a name="line.132"></a>
+<FONT color="green">133</FONT>                sGen.generate().encode( bOut );<a name="line.133"></a>
+<FONT color="green">134</FONT>            }<a name="line.134"></a>
+<FONT color="green">135</FONT>            catch ( PGPException e )<a name="line.135"></a>
+<FONT color="green">136</FONT>            {<a name="line.136"></a>
+<FONT color="green">137</FONT>                // TODO: more details<a name="line.137"></a>
+<FONT color="green">138</FONT>                throw new OpenPgpException( "Error calculating detached signature", e );<a name="line.138"></a>
+<FONT color="green">139</FONT>            }<a name="line.139"></a>
+<FONT color="green">140</FONT>            catch ( SignatureException e )<a name="line.140"></a>
+<FONT color="green">141</FONT>            {<a name="line.141"></a>
+<FONT color="green">142</FONT>                // TODO: more details<a name="line.142"></a>
+<FONT color="green">143</FONT>                throw new OpenPgpException( "Error calculating detached signature", e );<a name="line.143"></a>
+<FONT color="green">144</FONT>            }<a name="line.144"></a>
+<FONT color="green">145</FONT>            bOut.close();<a name="line.145"></a>
+<FONT color="green">146</FONT>            return signatureBytes != null ? signatureBytes.toByteArray() : null;<a name="line.146"></a>
+<FONT color="green">147</FONT>        }<a name="line.147"></a>
+<FONT color="green">148</FONT>    }<a name="line.148"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/BouncyCastleOpenPgpStreamingSigner.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/KeyRing.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/KeyRing.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/KeyRing.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,145 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import java.io.IOException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    import java.io.InputStream;<a name="line.21"></a>
+<FONT color="green">022</FONT>    <a name="line.22"></a>
+<FONT color="green">023</FONT>    import org.bouncycastle.openpgp.PGPException;<a name="line.23"></a>
+<FONT color="green">024</FONT>    import org.bouncycastle.openpgp.PGPPublicKey;<a name="line.24"></a>
+<FONT color="green">025</FONT>    import org.bouncycastle.openpgp.PGPSecretKey;<a name="line.25"></a>
+<FONT color="green">026</FONT>    <a name="line.26"></a>
+<FONT color="green">027</FONT>    /**<a name="line.27"></a>
+<FONT color="green">028</FONT>     * Interface describing a key ring for use in signing or verifying data.<a name="line.28"></a>
+<FONT color="green">029</FONT>     * <a name="line.29"></a>
+<FONT color="green">030</FONT>     * @todo separate pub/priv and better error handling<a name="line.30"></a>
+<FONT color="green">031</FONT>     *<a name="line.31"></a>
+<FONT color="green">032</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.32"></a>
+<FONT color="green">033</FONT>     */<a name="line.33"></a>
+<FONT color="green">034</FONT>    public interface KeyRing<a name="line.34"></a>
+<FONT color="green">035</FONT>    {<a name="line.35"></a>
+<FONT color="green">036</FONT>        String ROLE = KeyRing.class.getName();<a name="line.36"></a>
+<FONT color="green">037</FONT>    <a name="line.37"></a>
+<FONT color="green">038</FONT>        /**<a name="line.38"></a>
+<FONT color="green">039</FONT>         * Get the key ID of the first secret key that was added to the keyring.<a name="line.39"></a>
+<FONT color="green">040</FONT>         */<a name="line.40"></a>
+<FONT color="green">041</FONT>        String getFirstKeyId();<a name="line.41"></a>
+<FONT color="green">042</FONT>    <a name="line.42"></a>
+<FONT color="green">043</FONT>        /**<a name="line.43"></a>
+<FONT color="green">044</FONT>         * @return<a name="line.44"></a>
+<FONT color="green">045</FONT>         * @todo seems like the wrong place<a name="line.45"></a>
+<FONT color="green">046</FONT>         */<a name="line.46"></a>
+<FONT color="green">047</FONT>        char[] getPassword();<a name="line.47"></a>
+<FONT color="green">048</FONT>    <a name="line.48"></a>
+<FONT color="green">049</FONT>        /**<a name="line.49"></a>
+<FONT color="green">050</FONT>         * @param keyId<a name="line.50"></a>
+<FONT color="green">051</FONT>         * @return<a name="line.51"></a>
+<FONT color="green">052</FONT>         * @todo remove BC specifics<a name="line.52"></a>
+<FONT color="green">053</FONT>         */<a name="line.53"></a>
+<FONT color="green">054</FONT>        PGPSecretKey getSecretKey( String keyId );<a name="line.54"></a>
+<FONT color="green">055</FONT>    <a name="line.55"></a>
+<FONT color="green">056</FONT>        /**<a name="line.56"></a>
+<FONT color="green">057</FONT>         * @param keyId<a name="line.57"></a>
+<FONT color="green">058</FONT>         * @return<a name="line.58"></a>
+<FONT color="green">059</FONT>         * @todo remove BC specifics<a name="line.59"></a>
+<FONT color="green">060</FONT>         */<a name="line.60"></a>
+<FONT color="green">061</FONT>        PGPPublicKey getPublicKey( String keyId );<a name="line.61"></a>
+<FONT color="green">062</FONT>    <a name="line.62"></a>
+<FONT color="green">063</FONT>        /**<a name="line.63"></a>
+<FONT color="green">064</FONT>         * @param keyId<a name="line.64"></a>
+<FONT color="green">065</FONT>         * @return<a name="line.65"></a>
+<FONT color="green">066</FONT>         * @todo remove BC specifics<a name="line.66"></a>
+<FONT color="green">067</FONT>         */<a name="line.67"></a>
+<FONT color="green">068</FONT>        PGPSecretKey getSecretKey( long keyId );<a name="line.68"></a>
+<FONT color="green">069</FONT>    <a name="line.69"></a>
+<FONT color="green">070</FONT>        /**<a name="line.70"></a>
+<FONT color="green">071</FONT>         * @param keyId<a name="line.71"></a>
+<FONT color="green">072</FONT>         * @return<a name="line.72"></a>
+<FONT color="green">073</FONT>         * @todo remove BC specifics<a name="line.73"></a>
+<FONT color="green">074</FONT>         */<a name="line.74"></a>
+<FONT color="green">075</FONT>        PGPPublicKey getPublicKey( long keyId );<a name="line.75"></a>
+<FONT color="green">076</FONT>    <a name="line.76"></a>
+<FONT color="green">077</FONT>        void addPublicKeyRing( InputStream inputStream )<a name="line.77"></a>
+<FONT color="green">078</FONT>            throws IOException, PGPException;<a name="line.78"></a>
+<FONT color="green">079</FONT>    }<a name="line.79"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/KeyRing.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpException.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpException.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpException.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,102 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    /**<a name="line.20"></a>
+<FONT color="green">021</FONT>     * An exception occurring during the use of the OpenPGP library.<a name="line.21"></a>
+<FONT color="green">022</FONT>     *<a name="line.22"></a>
+<FONT color="green">023</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.23"></a>
+<FONT color="green">024</FONT>     */<a name="line.24"></a>
+<FONT color="green">025</FONT>    public class OpenPgpException extends Exception<a name="line.25"></a>
+<FONT color="green">026</FONT>    {<a name="line.26"></a>
+<FONT color="green">027</FONT>        public OpenPgpException( String message )<a name="line.27"></a>
+<FONT color="green">028</FONT>        {<a name="line.28"></a>
+<FONT color="green">029</FONT>            super( message );<a name="line.29"></a>
+<FONT color="green">030</FONT>        }<a name="line.30"></a>
+<FONT color="green">031</FONT>    <a name="line.31"></a>
+<FONT color="green">032</FONT>        public OpenPgpException( String message, Throwable cause )<a name="line.32"></a>
+<FONT color="green">033</FONT>        {<a name="line.33"></a>
+<FONT color="green">034</FONT>            super( message , cause );<a name="line.34"></a>
+<FONT color="green">035</FONT>        }<a name="line.35"></a>
+<FONT color="green">036</FONT>    }<a name="line.36"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpException.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSignatureVerifier.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSignatureVerifier.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSignatureVerifier.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,118 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import java.io.IOException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    import java.io.InputStream;<a name="line.21"></a>
+<FONT color="green">022</FONT>    <a name="line.22"></a>
+<FONT color="green">023</FONT>    /**<a name="line.23"></a>
+<FONT color="green">024</FONT>     * Interface for verifying data signed with OpenPGP.<a name="line.24"></a>
+<FONT color="green">025</FONT>     *<a name="line.25"></a>
+<FONT color="green">026</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.26"></a>
+<FONT color="green">027</FONT>     * @todo perhaps should have different interface methods for the default key<a name="line.27"></a>
+<FONT color="green">028</FONT>     * @todo should the exception be a verification exception instead of a common one?<a name="line.28"></a>
+<FONT color="green">029</FONT>     */<a name="line.29"></a>
+<FONT color="green">030</FONT>    public interface OpenPgpSignatureVerifier<a name="line.30"></a>
+<FONT color="green">031</FONT>    {<a name="line.31"></a>
+<FONT color="green">032</FONT>        String ROLE = OpenPgpSignatureVerifier.class.getName();<a name="line.32"></a>
+<FONT color="green">033</FONT>    <a name="line.33"></a>
+<FONT color="green">034</FONT>        /**<a name="line.34"></a>
+<FONT color="green">035</FONT>         * Verify a piece of data that was signed with OpenPGP.<a name="line.35"></a>
+<FONT color="green">036</FONT>         *<a name="line.36"></a>
+<FONT color="green">037</FONT>         * @param data    the data that was signed<a name="line.37"></a>
+<FONT color="green">038</FONT>         * @param keyRing the keyring containing the key used to sign the data<a name="line.38"></a>
+<FONT color="green">039</FONT>         */<a name="line.39"></a>
+<FONT color="green">040</FONT>        SignatureStatus verifySignature( InputStream data, KeyRing keyRing )<a name="line.40"></a>
+<FONT color="green">041</FONT>            throws OpenPgpException, UnknownKeyException;<a name="line.41"></a>
+<FONT color="green">042</FONT>    <a name="line.42"></a>
+<FONT color="green">043</FONT>        /**<a name="line.43"></a>
+<FONT color="green">044</FONT>         * Verify a piece of data against a detached signature.<a name="line.44"></a>
+<FONT color="green">045</FONT>         *<a name="line.45"></a>
+<FONT color="green">046</FONT>         * @param data         the data to that was signed<a name="line.46"></a>
+<FONT color="green">047</FONT>         * @param signature    the detached signature to verify against the data<a name="line.47"></a>
+<FONT color="green">048</FONT>         * @param keyRing      the keyring containing the key used to sign the data<a name="line.48"></a>
+<FONT color="green">049</FONT>         */<a name="line.49"></a>
+<FONT color="green">050</FONT>        SignatureStatus verifyDetachedSignature( InputStream data, InputStream signature, KeyRing keyRing )<a name="line.50"></a>
+<FONT color="green">051</FONT>            throws OpenPgpException, UnknownKeyException, IOException;<a name="line.51"></a>
+<FONT color="green">052</FONT>    }<a name="line.52"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSignatureVerifier.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSigner.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSigner.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSigner.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,124 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import java.io.IOException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    import java.io.InputStream;<a name="line.21"></a>
+<FONT color="green">022</FONT>    import java.io.OutputStream;<a name="line.22"></a>
+<FONT color="green">023</FONT>    <a name="line.23"></a>
+<FONT color="green">024</FONT>    /**<a name="line.24"></a>
+<FONT color="green">025</FONT>     * Interface for signing data with OpenPGP.<a name="line.25"></a>
+<FONT color="green">026</FONT>     *<a name="line.26"></a>
+<FONT color="green">027</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.27"></a>
+<FONT color="green">028</FONT>     * @todo perhaps should have different interface methods for the default key<a name="line.28"></a>
+<FONT color="green">029</FONT>     * @todo should the exception be a signature exception instead of a common one?<a name="line.29"></a>
+<FONT color="green">030</FONT>     */<a name="line.30"></a>
+<FONT color="green">031</FONT>    public interface OpenPgpSigner<a name="line.31"></a>
+<FONT color="green">032</FONT>    {<a name="line.32"></a>
+<FONT color="green">033</FONT>        String ROLE = OpenPgpSigner.class.getName();<a name="line.33"></a>
+<FONT color="green">034</FONT>    <a name="line.34"></a>
+<FONT color="green">035</FONT>        /**<a name="line.35"></a>
+<FONT color="green">036</FONT>         * Sign a piece of data with the given key.<a name="line.36"></a>
+<FONT color="green">037</FONT>         *<a name="line.37"></a>
+<FONT color="green">038</FONT>         * @param data         the data to sign<a name="line.38"></a>
+<FONT color="green">039</FONT>         * @param signedOutput the signed output data<a name="line.39"></a>
+<FONT color="green">040</FONT>         * @param keyId        the key ID of the key used to sign it<a name="line.40"></a>
+<FONT color="green">041</FONT>         * @param keyRing      the keyring containing the key above<a name="line.41"></a>
+<FONT color="green">042</FONT>         * @param asciiArmor   whether to ascii armor the output<a name="line.42"></a>
+<FONT color="green">043</FONT>         */<a name="line.43"></a>
+<FONT color="green">044</FONT>        void sign( InputStream data, OutputStream signedOutput, String keyId, KeyRing keyRing, boolean asciiArmor )<a name="line.44"></a>
+<FONT color="green">045</FONT>            throws OpenPgpException;<a name="line.45"></a>
+<FONT color="green">046</FONT>    <a name="line.46"></a>
+<FONT color="green">047</FONT>        /**<a name="line.47"></a>
+<FONT color="green">048</FONT>         * Sign a piece of data with the given key, storing the signature in a detached output.<a name="line.48"></a>
+<FONT color="green">049</FONT>         *<a name="line.49"></a>
+<FONT color="green">050</FONT>         * @param data       the data to sign<a name="line.50"></a>
+<FONT color="green">051</FONT>         * @param signature  the detached signature<a name="line.51"></a>
+<FONT color="green">052</FONT>         * @param keyId      the key ID of the key used to sign it<a name="line.52"></a>
+<FONT color="green">053</FONT>         * @param keyRing    the keyring containing the key above<a name="line.53"></a>
+<FONT color="green">054</FONT>         * @param asciiArmor whether to ascii armor the output<a name="line.54"></a>
+<FONT color="green">055</FONT>         */<a name="line.55"></a>
+<FONT color="green">056</FONT>        void detachedSign( InputStream data, OutputStream signature, String keyId, KeyRing keyRing, boolean asciiArmor )<a name="line.56"></a>
+<FONT color="green">057</FONT>            throws OpenPgpException, IOException;<a name="line.57"></a>
+<FONT color="green">058</FONT>    }<a name="line.58"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpSigner.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,125 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import java.io.IOException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    <a name="line.21"></a>
+<FONT color="green">022</FONT>    /**<a name="line.22"></a>
+<FONT color="green">023</FONT>     * An interface for updating an OpenPGP signature on the fly with streaming data.<a name="line.23"></a>
+<FONT color="green">024</FONT>     *<a name="line.24"></a>
+<FONT color="green">025</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.25"></a>
+<FONT color="green">026</FONT>     */<a name="line.26"></a>
+<FONT color="green">027</FONT>    public interface OpenPgpStreamingSignatureVerifier<a name="line.27"></a>
+<FONT color="green">028</FONT>    {<a name="line.28"></a>
+<FONT color="green">029</FONT>        String ROLE = OpenPgpStreamingSignatureVerifier.class.getName();<a name="line.29"></a>
+<FONT color="green">030</FONT>    <a name="line.30"></a>
+<FONT color="green">031</FONT>        /**<a name="line.31"></a>
+<FONT color="green">032</FONT>         * Update the signature with the next block from the data buffer.<a name="line.32"></a>
+<FONT color="green">033</FONT>         *<a name="line.33"></a>
+<FONT color="green">034</FONT>         * @param buf the buffer<a name="line.34"></a>
+<FONT color="green">035</FONT>         * @throws org.apache.commons.openpgp.OpenPgpException if the buffer is not valid for updating the signature<a name="line.35"></a>
+<FONT color="green">036</FONT>         */<a name="line.36"></a>
+<FONT color="green">037</FONT>        void update( byte[] buf )<a name="line.37"></a>
+<FONT color="green">038</FONT>            throws OpenPgpException;<a name="line.38"></a>
+<FONT color="green">039</FONT>    <a name="line.39"></a>
+<FONT color="green">040</FONT>        /**<a name="line.40"></a>
+<FONT color="green">041</FONT>         * Update the signature with the next block from the data buffer.<a name="line.41"></a>
+<FONT color="green">042</FONT>         *<a name="line.42"></a>
+<FONT color="green">043</FONT>         * @param buf    the buffer<a name="line.43"></a>
+<FONT color="green">044</FONT>         * @param offset offset within the buffer to start from<a name="line.44"></a>
+<FONT color="green">045</FONT>         * @param length number of bytes in the buffer to read from<a name="line.45"></a>
+<FONT color="green">046</FONT>         * @throws org.apache.commons.openpgp.OpenPgpException if the buffer is not valid for updating the signature<a name="line.46"></a>
+<FONT color="green">047</FONT>         */<a name="line.47"></a>
+<FONT color="green">048</FONT>        void update( byte[] buf, int offset, int length )<a name="line.48"></a>
+<FONT color="green">049</FONT>            throws OpenPgpException;<a name="line.49"></a>
+<FONT color="green">050</FONT>    <a name="line.50"></a>
+<FONT color="green">051</FONT>        /**<a name="line.51"></a>
+<FONT color="green">052</FONT>         * Finish and verify the signature that has been obtained.<a name="line.52"></a>
+<FONT color="green">053</FONT>         *<a name="line.53"></a>
+<FONT color="green">054</FONT>         * @return the status of the signature<a name="line.54"></a>
+<FONT color="green">055</FONT>         * @throws org.apache.commons.openpgp.OpenPgpException if the signature is not in a consistent or complete state<a name="line.55"></a>
+<FONT color="green">056</FONT>         */<a name="line.56"></a>
+<FONT color="green">057</FONT>        SignatureStatus finish()<a name="line.57"></a>
+<FONT color="green">058</FONT>            throws OpenPgpException, IOException;<a name="line.58"></a>
+<FONT color="green">059</FONT>    }<a name="line.59"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSignatureVerifier.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSigner.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSigner.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSigner.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,125 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    import java.io.IOException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    <a name="line.21"></a>
+<FONT color="green">022</FONT>    /**<a name="line.22"></a>
+<FONT color="green">023</FONT>     * An interface for updating an OpenPGP signature on the fly with streaming data.<a name="line.23"></a>
+<FONT color="green">024</FONT>     *<a name="line.24"></a>
+<FONT color="green">025</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.25"></a>
+<FONT color="green">026</FONT>     */<a name="line.26"></a>
+<FONT color="green">027</FONT>    public interface OpenPgpStreamingSigner<a name="line.27"></a>
+<FONT color="green">028</FONT>    {<a name="line.28"></a>
+<FONT color="green">029</FONT>        String ROLE = OpenPgpStreamingSigner.class.getName();<a name="line.29"></a>
+<FONT color="green">030</FONT>    <a name="line.30"></a>
+<FONT color="green">031</FONT>        /**<a name="line.31"></a>
+<FONT color="green">032</FONT>         * Update the signature with the next block from the data buffer.<a name="line.32"></a>
+<FONT color="green">033</FONT>         *<a name="line.33"></a>
+<FONT color="green">034</FONT>         * @param buf the buffer<a name="line.34"></a>
+<FONT color="green">035</FONT>         * @throws OpenPgpException if the buffer is not valid for updating the signature<a name="line.35"></a>
+<FONT color="green">036</FONT>         */<a name="line.36"></a>
+<FONT color="green">037</FONT>        void update( byte[] buf )<a name="line.37"></a>
+<FONT color="green">038</FONT>            throws OpenPgpException;<a name="line.38"></a>
+<FONT color="green">039</FONT>    <a name="line.39"></a>
+<FONT color="green">040</FONT>        /**<a name="line.40"></a>
+<FONT color="green">041</FONT>         * Update the signature with the next block from the data buffer.<a name="line.41"></a>
+<FONT color="green">042</FONT>         *<a name="line.42"></a>
+<FONT color="green">043</FONT>         * @param buf    the buffer<a name="line.43"></a>
+<FONT color="green">044</FONT>         * @param offset offset within the buffer to start from<a name="line.44"></a>
+<FONT color="green">045</FONT>         * @param length number of bytes in the buffer to read from<a name="line.45"></a>
+<FONT color="green">046</FONT>         * @throws OpenPgpException if the buffer is not valid for updating the signature<a name="line.46"></a>
+<FONT color="green">047</FONT>         */<a name="line.47"></a>
+<FONT color="green">048</FONT>        void update( byte[] buf, int offset, int length )<a name="line.48"></a>
+<FONT color="green">049</FONT>            throws OpenPgpException;<a name="line.49"></a>
+<FONT color="green">050</FONT>    <a name="line.50"></a>
+<FONT color="green">051</FONT>        /**<a name="line.51"></a>
+<FONT color="green">052</FONT>         * Finish creating the signature.<a name="line.52"></a>
+<FONT color="green">053</FONT>         *<a name="line.53"></a>
+<FONT color="green">054</FONT>         * @return the completed signature<a name="line.54"></a>
+<FONT color="green">055</FONT>         * @throws OpenPgpException if the signature is not in a consistent or complete state<a name="line.55"></a>
+<FONT color="green">056</FONT>         */<a name="line.56"></a>
+<FONT color="green">057</FONT>        byte[] finish()<a name="line.57"></a>
+<FONT color="green">058</FONT>            throws OpenPgpException, IOException;<a name="line.58"></a>
+<FONT color="green">059</FONT>    }<a name="line.59"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/OpenPgpStreamingSigner.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/SignatureStatus.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/SignatureStatus.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/SignatureStatus.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,141 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    /**<a name="line.20"></a>
+<FONT color="green">021</FONT>     * Enumerated type indicating the status of data that was signed.<a name="line.21"></a>
+<FONT color="green">022</FONT>     * &lt;p/&gt;<a name="line.22"></a>
+<FONT color="green">023</FONT>     * Values:<a name="line.23"></a>
+<FONT color="green">024</FONT>     * &lt;ul&gt;<a name="line.24"></a>
+<FONT color="green">025</FONT>     * &lt;li&gt;&lt;code&gt;VALID_TRUSTED&lt;/code&gt;&lt;/li&gt;<a name="line.25"></a>
+<FONT color="green">026</FONT>     * &lt;li&gt;&lt;code&gt;VALID_UNTRUSTED&lt;/code&gt;&lt;/li&gt;<a name="line.26"></a>
+<FONT color="green">027</FONT>     * &lt;li&gt;&lt;code&gt;INVALID&lt;/code&gt;&lt;/li&gt;<a name="line.27"></a>
+<FONT color="green">028</FONT>     * &lt;/ul&gt;<a name="line.28"></a>
+<FONT color="green">029</FONT>     *<a name="line.29"></a>
+<FONT color="green">030</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.30"></a>
+<FONT color="green">031</FONT>     * @todo incorporate levels of trust<a name="line.31"></a>
+<FONT color="green">032</FONT>     */<a name="line.32"></a>
+<FONT color="green">033</FONT>    public class SignatureStatus<a name="line.33"></a>
+<FONT color="green">034</FONT>    {<a name="line.34"></a>
+<FONT color="green">035</FONT>        /**<a name="line.35"></a>
+<FONT color="green">036</FONT>         * Status that indicates the signature is valid, and from a trusted source.<a name="line.36"></a>
+<FONT color="green">037</FONT>         */<a name="line.37"></a>
+<FONT color="green">038</FONT>        public static SignatureStatus VALID_TRUSTED = new SignatureStatus( true, true );<a name="line.38"></a>
+<FONT color="green">039</FONT>    <a name="line.39"></a>
+<FONT color="green">040</FONT>        /**<a name="line.40"></a>
+<FONT color="green">041</FONT>         * Status that indicates the signature is valid, but from an unknown or untrusted source.<a name="line.41"></a>
+<FONT color="green">042</FONT>         */<a name="line.42"></a>
+<FONT color="green">043</FONT>        public static SignatureStatus VALID_UNTRUSTED = new SignatureStatus( true, false );<a name="line.43"></a>
+<FONT color="green">044</FONT>    <a name="line.44"></a>
+<FONT color="green">045</FONT>        /**<a name="line.45"></a>
+<FONT color="green">046</FONT>         * Status that indicates the signature is invalid.<a name="line.46"></a>
+<FONT color="green">047</FONT>         */<a name="line.47"></a>
+<FONT color="green">048</FONT>        public static SignatureStatus INVALID = new SignatureStatus( false, false );<a name="line.48"></a>
+<FONT color="green">049</FONT>    <a name="line.49"></a>
+<FONT color="green">050</FONT>        /**<a name="line.50"></a>
+<FONT color="green">051</FONT>         * Whether the signature is valid.<a name="line.51"></a>
+<FONT color="green">052</FONT>         */<a name="line.52"></a>
+<FONT color="green">053</FONT>        private final boolean valid;<a name="line.53"></a>
+<FONT color="green">054</FONT>    <a name="line.54"></a>
+<FONT color="green">055</FONT>        /**<a name="line.55"></a>
+<FONT color="green">056</FONT>         * Whether the signature is trusted.<a name="line.56"></a>
+<FONT color="green">057</FONT>         */<a name="line.57"></a>
+<FONT color="green">058</FONT>        private final boolean trusted;<a name="line.58"></a>
+<FONT color="green">059</FONT>    <a name="line.59"></a>
+<FONT color="green">060</FONT>        private SignatureStatus( boolean valid, boolean trusted )<a name="line.60"></a>
+<FONT color="green">061</FONT>        {<a name="line.61"></a>
+<FONT color="green">062</FONT>            this.valid = valid;<a name="line.62"></a>
+<FONT color="green">063</FONT>            this.trusted = trusted;<a name="line.63"></a>
+<FONT color="green">064</FONT>        }<a name="line.64"></a>
+<FONT color="green">065</FONT>    <a name="line.65"></a>
+<FONT color="green">066</FONT>        public boolean isValid()<a name="line.66"></a>
+<FONT color="green">067</FONT>        {<a name="line.67"></a>
+<FONT color="green">068</FONT>            return valid;<a name="line.68"></a>
+<FONT color="green">069</FONT>        }<a name="line.69"></a>
+<FONT color="green">070</FONT>    <a name="line.70"></a>
+<FONT color="green">071</FONT>        public boolean isTrusted()<a name="line.71"></a>
+<FONT color="green">072</FONT>        {<a name="line.72"></a>
+<FONT color="green">073</FONT>            return trusted;<a name="line.73"></a>
+<FONT color="green">074</FONT>        }<a name="line.74"></a>
+<FONT color="green">075</FONT>    }<a name="line.75"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/SignatureStatus.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/UnknownKeyException.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/UnknownKeyException.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/UnknownKeyException.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,102 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    package org.apache.commons.openpgp;<a name="line.1"></a>
+<FONT color="green">002</FONT>    <a name="line.2"></a>
+<FONT color="green">003</FONT>    /*<a name="line.3"></a>
+<FONT color="green">004</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.4"></a>
+<FONT color="green">005</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.5"></a>
+<FONT color="green">006</FONT>     * this work for additional information regarding copyright ownership.<a name="line.6"></a>
+<FONT color="green">007</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.7"></a>
+<FONT color="green">008</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.8"></a>
+<FONT color="green">009</FONT>     * the License.  You may obtain a copy of the License at<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.11"></a>
+<FONT color="green">012</FONT>     *<a name="line.12"></a>
+<FONT color="green">013</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.13"></a>
+<FONT color="green">014</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.14"></a>
+<FONT color="green">015</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.15"></a>
+<FONT color="green">016</FONT>     * See the License for the specific language governing permissions and<a name="line.16"></a>
+<FONT color="green">017</FONT>     * limitations under the License.<a name="line.17"></a>
+<FONT color="green">018</FONT>     */<a name="line.18"></a>
+<FONT color="green">019</FONT>    <a name="line.19"></a>
+<FONT color="green">020</FONT>    /**<a name="line.20"></a>
+<FONT color="green">021</FONT>     * An exception occurring during the verification of a signature, when the key is not found in the keyring.<a name="line.21"></a>
+<FONT color="green">022</FONT>     *<a name="line.22"></a>
+<FONT color="green">023</FONT>     * @author &lt;a href="mailto:brett@apache.org"&gt;Brett Porter&lt;/a&gt;<a name="line.23"></a>
+<FONT color="green">024</FONT>     */<a name="line.24"></a>
+<FONT color="green">025</FONT>    public class UnknownKeyException extends OpenPgpException<a name="line.25"></a>
+<FONT color="green">026</FONT>    {<a name="line.26"></a>
+<FONT color="green">027</FONT>        public UnknownKeyException( String message )<a name="line.27"></a>
+<FONT color="green">028</FONT>        {<a name="line.28"></a>
+<FONT color="green">029</FONT>            super( message );<a name="line.29"></a>
+<FONT color="green">030</FONT>        }<a name="line.30"></a>
+<FONT color="green">031</FONT>    <a name="line.31"></a>
+<FONT color="green">032</FONT>        public UnknownKeyException( String message, Throwable cause )<a name="line.32"></a>
+<FONT color="green">033</FONT>        {<a name="line.33"></a>
+<FONT color="green">034</FONT>            super( message, cause );<a name="line.34"></a>
+<FONT color="green">035</FONT>        }<a name="line.35"></a>
+<FONT color="green">036</FONT>    }<a name="line.36"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/UnknownKeyException.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/ant/OpenPgpSignerTask.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/ant/OpenPgpSignerTask.html (added)
+++ websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/ant/OpenPgpSignerTask.html Sat Aug 10 22:25:17 2013
@@ -0,0 +1,279 @@
+<HTML>
+<BODY BGCOLOR="white">
+<PRE>
+<FONT color="green">001</FONT>    /*<a name="line.1"></a>
+<FONT color="green">002</FONT>     * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<FONT color="green">003</FONT>     * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<FONT color="green">004</FONT>     * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<FONT color="green">005</FONT>     * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<FONT color="green">006</FONT>     * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<FONT color="green">007</FONT>     * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<FONT color="green">008</FONT>     *<a name="line.8"></a>
+<FONT color="green">009</FONT>     *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<FONT color="green">010</FONT>     *<a name="line.10"></a>
+<FONT color="green">011</FONT>     * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<FONT color="green">012</FONT>     * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<FONT color="green">013</FONT>     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<FONT color="green">014</FONT>     * See the License for the specific language governing permissions and<a name="line.14"></a>
+<FONT color="green">015</FONT>     * limitations under the License.<a name="line.15"></a>
+<FONT color="green">016</FONT>     */<a name="line.16"></a>
+<FONT color="green">017</FONT>    package org.apache.commons.openpgp.ant;<a name="line.17"></a>
+<FONT color="green">018</FONT>    <a name="line.18"></a>
+<FONT color="green">019</FONT>    import org.apache.tools.ant.Task;<a name="line.19"></a>
+<FONT color="green">020</FONT>    import org.apache.tools.ant.BuildException;<a name="line.20"></a>
+<FONT color="green">021</FONT>    import org.apache.tools.ant.DirectoryScanner;<a name="line.21"></a>
+<FONT color="green">022</FONT>    import org.apache.tools.ant.util.FileNameMapper;<a name="line.22"></a>
+<FONT color="green">023</FONT>    import org.apache.tools.ant.util.GlobPatternMapper;<a name="line.23"></a>
+<FONT color="green">024</FONT>    import org.apache.tools.ant.util.FileUtils;<a name="line.24"></a>
+<FONT color="green">025</FONT>    import org.apache.tools.ant.types.FileSet;<a name="line.25"></a>
+<FONT color="green">026</FONT>    import org.apache.tools.ant.types.Mapper;<a name="line.26"></a>
+<FONT color="green">027</FONT>    import org.apache.commons.openpgp.*;<a name="line.27"></a>
+<FONT color="green">028</FONT>    import org.bouncycastle.openpgp.PGPException;<a name="line.28"></a>
+<FONT color="green">029</FONT>    <a name="line.29"></a>
+<FONT color="green">030</FONT>    import java.io.*;<a name="line.30"></a>
+<FONT color="green">031</FONT>    import java.util.Collection;<a name="line.31"></a>
+<FONT color="green">032</FONT>    import java.util.ArrayList;<a name="line.32"></a>
+<FONT color="green">033</FONT>    import java.util.Iterator;<a name="line.33"></a>
+<FONT color="green">034</FONT>    <a name="line.34"></a>
+<FONT color="green">035</FONT>    /**<a name="line.35"></a>
+<FONT color="green">036</FONT>     */<a name="line.36"></a>
+<FONT color="green">037</FONT>    public class OpenPgpSignerTask extends Task {<a name="line.37"></a>
+<FONT color="green">038</FONT>        private File secring;<a name="line.38"></a>
+<FONT color="green">039</FONT>        private File pubring;<a name="line.39"></a>
+<FONT color="green">040</FONT>        private String password;<a name="line.40"></a>
+<FONT color="green">041</FONT>        private String keyId;<a name="line.41"></a>
+<FONT color="green">042</FONT>        private Collection&lt;FileSet&gt; tosign = new ArrayList&lt;FileSet&gt;();<a name="line.42"></a>
+<FONT color="green">043</FONT>        private File artefact;<a name="line.43"></a>
+<FONT color="green">044</FONT>        private boolean asciiarmor = true;<a name="line.44"></a>
+<FONT color="green">045</FONT>        private Mapper mapperElement;<a name="line.45"></a>
+<FONT color="green">046</FONT>    <a name="line.46"></a>
+<FONT color="green">047</FONT>        /**<a name="line.47"></a>
+<FONT color="green">048</FONT>         * set the secret keyring<a name="line.48"></a>
+<FONT color="green">049</FONT>         * @param secring secret keyring file<a name="line.49"></a>
+<FONT color="green">050</FONT>         */<a name="line.50"></a>
+<FONT color="green">051</FONT>        public void setSecring(File secring) {<a name="line.51"></a>
+<FONT color="green">052</FONT>            this.secring = secring;<a name="line.52"></a>
+<FONT color="green">053</FONT>        }<a name="line.53"></a>
+<FONT color="green">054</FONT>    <a name="line.54"></a>
+<FONT color="green">055</FONT>        /**<a name="line.55"></a>
+<FONT color="green">056</FONT>         * set the public keyring<a name="line.56"></a>
+<FONT color="green">057</FONT>         * @param pubring public keyring file<a name="line.57"></a>
+<FONT color="green">058</FONT>         */<a name="line.58"></a>
+<FONT color="green">059</FONT>        public void setPubring(File pubring) {<a name="line.59"></a>
+<FONT color="green">060</FONT>            this.pubring = pubring;<a name="line.60"></a>
+<FONT color="green">061</FONT>        }<a name="line.61"></a>
+<FONT color="green">062</FONT>    <a name="line.62"></a>
+<FONT color="green">063</FONT>        /**<a name="line.63"></a>
+<FONT color="green">064</FONT>         * set the key id<a name="line.64"></a>
+<FONT color="green">065</FONT>         * @param keyId<a name="line.65"></a>
+<FONT color="green">066</FONT>         */<a name="line.66"></a>
+<FONT color="green">067</FONT>        public void setKeyId(String keyId) {<a name="line.67"></a>
+<FONT color="green">068</FONT>            this.keyId = keyId;<a name="line.68"></a>
+<FONT color="green">069</FONT>        }<a name="line.69"></a>
+<FONT color="green">070</FONT>    <a name="line.70"></a>
+<FONT color="green">071</FONT>        /**<a name="line.71"></a>
+<FONT color="green">072</FONT>         * asciiarmor the signature ?<a name="line.72"></a>
+<FONT color="green">073</FONT>         * @param asciiarmor ascii armored signature ?<a name="line.73"></a>
+<FONT color="green">074</FONT>         */<a name="line.74"></a>
+<FONT color="green">075</FONT>        public void setAsciiarmor(boolean asciiarmor) {<a name="line.75"></a>
+<FONT color="green">076</FONT>            this.asciiarmor = asciiarmor;<a name="line.76"></a>
+<FONT color="green">077</FONT>        }<a name="line.77"></a>
+<FONT color="green">078</FONT>    <a name="line.78"></a>
+<FONT color="green">079</FONT>        /**<a name="line.79"></a>
+<FONT color="green">080</FONT>         * set the value of the password<a name="line.80"></a>
+<FONT color="green">081</FONT>         * @param password value of the password<a name="line.81"></a>
+<FONT color="green">082</FONT>         */<a name="line.82"></a>
+<FONT color="green">083</FONT>        public void setPassword(String password) {<a name="line.83"></a>
+<FONT color="green">084</FONT>            this.password = password;<a name="line.84"></a>
+<FONT color="green">085</FONT>        }<a name="line.85"></a>
+<FONT color="green">086</FONT>    <a name="line.86"></a>
+<FONT color="green">087</FONT>        /**<a name="line.87"></a>
+<FONT color="green">088</FONT>         * artefact to be signed<a name="line.88"></a>
+<FONT color="green">089</FONT>         * @param artefact artefact to be signed<a name="line.89"></a>
+<FONT color="green">090</FONT>         */<a name="line.90"></a>
+<FONT color="green">091</FONT>        public void setArtefact(File artefact) {<a name="line.91"></a>
+<FONT color="green">092</FONT>            this.artefact = artefact;<a name="line.92"></a>
+<FONT color="green">093</FONT>        }<a name="line.93"></a>
+<FONT color="green">094</FONT>    <a name="line.94"></a>
+<FONT color="green">095</FONT>    <a name="line.95"></a>
+<FONT color="green">096</FONT>        public void add(FileSet fs) {<a name="line.96"></a>
+<FONT color="green">097</FONT>            tosign.add(fs);<a name="line.97"></a>
+<FONT color="green">098</FONT>        }<a name="line.98"></a>
+<FONT color="green">099</FONT>    <a name="line.99"></a>
+<FONT color="green">100</FONT>        /**<a name="line.100"></a>
+<FONT color="green">101</FONT>         * Define the mapper to map source to destination files.<a name="line.101"></a>
+<FONT color="green">102</FONT>         * @return a mapper to be configured.<a name="line.102"></a>
+<FONT color="green">103</FONT>         * @exception org.apache.tools.ant.BuildException if more than one mapper is defined.<a name="line.103"></a>
+<FONT color="green">104</FONT>         */<a name="line.104"></a>
+<FONT color="green">105</FONT>        public Mapper createMapper() throws BuildException {<a name="line.105"></a>
+<FONT color="green">106</FONT>            if (mapperElement != null) {<a name="line.106"></a>
+<FONT color="green">107</FONT>                throw new BuildException("Cannot define more than one mapper",<a name="line.107"></a>
+<FONT color="green">108</FONT>                        getLocation());<a name="line.108"></a>
+<FONT color="green">109</FONT>            }<a name="line.109"></a>
+<FONT color="green">110</FONT>            mapperElement = new Mapper(getProject());<a name="line.110"></a>
+<FONT color="green">111</FONT>            return mapperElement;<a name="line.111"></a>
+<FONT color="green">112</FONT>        }<a name="line.112"></a>
+<FONT color="green">113</FONT>    <a name="line.113"></a>
+<FONT color="green">114</FONT>        public void execute() {<a name="line.114"></a>
+<FONT color="green">115</FONT>            if (secring == null) {<a name="line.115"></a>
+<FONT color="green">116</FONT>                throw new BuildException("secring attribute compulsory");<a name="line.116"></a>
+<FONT color="green">117</FONT>            }<a name="line.117"></a>
+<FONT color="green">118</FONT>            if (pubring == null) {<a name="line.118"></a>
+<FONT color="green">119</FONT>                throw new BuildException("pubring attribute compulsory");<a name="line.119"></a>
+<FONT color="green">120</FONT>            }<a name="line.120"></a>
+<FONT color="green">121</FONT>            if (password == null) {<a name="line.121"></a>
+<FONT color="green">122</FONT>                throw new BuildException("password attribute compulsory");<a name="line.122"></a>
+<FONT color="green">123</FONT>            }<a name="line.123"></a>
+<FONT color="green">124</FONT>            if (tosign.size() == 0 &amp;&amp; artefact == null) {<a name="line.124"></a>
+<FONT color="green">125</FONT>                throw new BuildException("supply the attribute 'artefact' or one nested fileset");<a name="line.125"></a>
+<FONT color="green">126</FONT>            }<a name="line.126"></a>
+<FONT color="green">127</FONT>            if (!secring.exists() || !secring.canRead()) {<a name="line.127"></a>
+<FONT color="green">128</FONT>                throw new  BuildException("secret keyring file '" + secring.getAbsolutePath() + "' does not exist or is not readable");<a name="line.128"></a>
+<FONT color="green">129</FONT>            }<a name="line.129"></a>
+<FONT color="green">130</FONT>            if (!pubring.exists() || !pubring.canRead()) {<a name="line.130"></a>
+<FONT color="green">131</FONT>                throw new  BuildException("public keyring file '" + pubring.getAbsolutePath() + "' does not exist or is not readable");<a name="line.131"></a>
+<FONT color="green">132</FONT>            }<a name="line.132"></a>
+<FONT color="green">133</FONT>            FileInputStream secStream;<a name="line.133"></a>
+<FONT color="green">134</FONT>            FileInputStream pubStream;<a name="line.134"></a>
+<FONT color="green">135</FONT>            KeyRing keyRing = null;<a name="line.135"></a>
+<FONT color="green">136</FONT>            try {<a name="line.136"></a>
+<FONT color="green">137</FONT>                secStream = new FileInputStream(secring);<a name="line.137"></a>
+<FONT color="green">138</FONT>                pubStream = new FileInputStream(pubring);<a name="line.138"></a>
+<FONT color="green">139</FONT>                keyRing = new BouncyCastleKeyRing(secStream,<a name="line.139"></a>
+<FONT color="green">140</FONT>                        pubStream, password.toCharArray() );<a name="line.140"></a>
+<FONT color="green">141</FONT>            } catch (IOException ioe) {<a name="line.141"></a>
+<FONT color="green">142</FONT>                throw new BuildException(ioe);<a name="line.142"></a>
+<FONT color="green">143</FONT>            } catch (PGPException pgpe) {<a name="line.143"></a>
+<FONT color="green">144</FONT>                throw new BuildException(pgpe);<a name="line.144"></a>
+<FONT color="green">145</FONT>            }<a name="line.145"></a>
+<FONT color="green">146</FONT>            if (artefact != null) {<a name="line.146"></a>
+<FONT color="green">147</FONT>                dosign(keyRing, artefact);<a name="line.147"></a>
+<FONT color="green">148</FONT>            }<a name="line.148"></a>
+<FONT color="green">149</FONT>            if (tosign.size() != 0) {<a name="line.149"></a>
+<FONT color="green">150</FONT>                for (FileSet fileset : tosign) {<a name="line.150"></a>
+<FONT color="green">151</FONT>                    dosign(keyRing, fileset);<a name="line.151"></a>
+<FONT color="green">152</FONT>                }<a name="line.152"></a>
+<FONT color="green">153</FONT>            }<a name="line.153"></a>
+<FONT color="green">154</FONT>            FileUtils.close(secStream);<a name="line.154"></a>
+<FONT color="green">155</FONT>            FileUtils.close(pubStream);<a name="line.155"></a>
+<FONT color="green">156</FONT>        }<a name="line.156"></a>
+<FONT color="green">157</FONT>        private void dosign(KeyRing keyRing, FileSet fs) {<a name="line.157"></a>
+<FONT color="green">158</FONT>            DirectoryScanner ds = fs.getDirectoryScanner(getProject());<a name="line.158"></a>
+<FONT color="green">159</FONT>            String[] artefacts = ds.getIncludedFiles();<a name="line.159"></a>
+<FONT color="green">160</FONT>            for (String artefact : artefacts) {<a name="line.160"></a>
+<FONT color="green">161</FONT>                dosign(keyRing, new File(fs.getDir(getProject()), artefact), fs.getDir(getProject()), artefact);<a name="line.161"></a>
+<FONT color="green">162</FONT>            }<a name="line.162"></a>
+<FONT color="green">163</FONT>        }<a name="line.163"></a>
+<FONT color="green">164</FONT>        private void dosign(KeyRing keyRing, File oneartefact) {<a name="line.164"></a>
+<FONT color="green">165</FONT>            dosign(keyRing, oneartefact, oneartefact.getParentFile(), oneartefact.getName());<a name="line.165"></a>
+<FONT color="green">166</FONT>        }<a name="line.166"></a>
+<FONT color="green">167</FONT>        private void dosign(KeyRing keyRing, File oneartefact, File basedir, String relpath) {<a name="line.167"></a>
+<FONT color="green">168</FONT>            FileInputStream fis = null;<a name="line.168"></a>
+<FONT color="green">169</FONT>            FileOutputStream fos = null;<a name="line.169"></a>
+<FONT color="green">170</FONT>            File signature;<a name="line.170"></a>
+<FONT color="green">171</FONT>    <a name="line.171"></a>
+<FONT color="green">172</FONT>            try {<a name="line.172"></a>
+<FONT color="green">173</FONT>                fis = new FileInputStream(oneartefact);<a name="line.173"></a>
+<FONT color="green">174</FONT>                FileNameMapper mapper = getMapper();<a name="line.174"></a>
+<FONT color="green">175</FONT>                String [] mappedFiles = mapper.mapFileName(relpath);<a name="line.175"></a>
+<FONT color="green">176</FONT>                if (mappedFiles == null || mappedFiles.length != 1) {<a name="line.176"></a>
+<FONT color="green">177</FONT>                    throw new BuildException("mapper returned more or less than one output");<a name="line.177"></a>
+<FONT color="green">178</FONT>                }<a name="line.178"></a>
+<FONT color="green">179</FONT>                signature = new File(basedir, mappedFiles[0]);<a name="line.179"></a>
+<FONT color="green">180</FONT>                fos = new FileOutputStream(signature);<a name="line.180"></a>
+<FONT color="green">181</FONT>                OpenPgpSigner signer = new BouncyCastleOpenPgpSigner();<a name="line.181"></a>
+<FONT color="green">182</FONT>                signer.detachedSign(fis, fos, keyId, keyRing, asciiarmor);<a name="line.182"></a>
+<FONT color="green">183</FONT>            } catch (FileNotFoundException fnfe) {<a name="line.183"></a>
+<FONT color="green">184</FONT>                throw new BuildException(fnfe);<a name="line.184"></a>
+<FONT color="green">185</FONT>            } catch (IOException ioe) {<a name="line.185"></a>
+<FONT color="green">186</FONT>                throw new BuildException(ioe);<a name="line.186"></a>
+<FONT color="green">187</FONT>            } catch (OpenPgpException opgpe) {<a name="line.187"></a>
+<FONT color="green">188</FONT>                throw new BuildException(opgpe);<a name="line.188"></a>
+<FONT color="green">189</FONT>            }<a name="line.189"></a>
+<FONT color="green">190</FONT>            FileUtils.close(fos);<a name="line.190"></a>
+<FONT color="green">191</FONT>            FileUtils.close(fis);<a name="line.191"></a>
+<FONT color="green">192</FONT>    <a name="line.192"></a>
+<FONT color="green">193</FONT>        }<a name="line.193"></a>
+<FONT color="green">194</FONT>        /**<a name="line.194"></a>
+<FONT color="green">195</FONT>         * returns the mapper to use based on nested elements or the<a name="line.195"></a>
+<FONT color="green">196</FONT>         */<a name="line.196"></a>
+<FONT color="green">197</FONT>        private FileNameMapper getMapper() {<a name="line.197"></a>
+<FONT color="green">198</FONT>            FileNameMapper mapper = null;<a name="line.198"></a>
+<FONT color="green">199</FONT>            if (mapperElement != null) {<a name="line.199"></a>
+<FONT color="green">200</FONT>                mapper = mapperElement.getImplementation();<a name="line.200"></a>
+<FONT color="green">201</FONT>            } else {<a name="line.201"></a>
+<FONT color="green">202</FONT>                mapper = new GlobPatternMapper();<a name="line.202"></a>
+<FONT color="green">203</FONT>                mapper.setFrom("*");<a name="line.203"></a>
+<FONT color="green">204</FONT>                if (asciiarmor) {<a name="line.204"></a>
+<FONT color="green">205</FONT>                    mapper.setTo("*.asc");<a name="line.205"></a>
+<FONT color="green">206</FONT>                } else {<a name="line.206"></a>
+<FONT color="green">207</FONT>                    mapper.setTo("*.sig");<a name="line.207"></a>
+<FONT color="green">208</FONT>                }<a name="line.208"></a>
+<FONT color="green">209</FONT>            }<a name="line.209"></a>
+<FONT color="green">210</FONT>            return mapper;<a name="line.210"></a>
+<FONT color="green">211</FONT>        }<a name="line.211"></a>
+<FONT color="green">212</FONT>    <a name="line.212"></a>
+<FONT color="green">213</FONT>    }<a name="line.213"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</PRE>
+</BODY>
+</HTML>
\ No newline at end of file

Propchange: websites/production/commons/content/sandbox/commons-openpgp/apidocs/src-html/org/apache/commons/openpgp/ant/OpenPgpSignerTask.html
------------------------------------------------------------------------------
    svn:eol-style = native