[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bouncycastle-crypto-dev
Subject:    Re: [dev-crypto] Problem with Bouncy Castle
From:       David Hook <dgh () autochthonous ! org>
Date:       2012-12-09 22:28:01
Message-ID: 50C51071.7060207 () autochthonous ! org
[Download RAW message or body]

Check your classpath. You'll find an earlier version of the provider in it.

Regards,

David

On 08/12/12 12:17, Florian Krauthan wrote:
> Hello,
> If i use this code:
> SignerInfoGenerator signerInfoGenerator = new 
> JcaSimpleSignerInfoGeneratorBuilder()
> .setProvider(BouncyCastleProvider.PROVIDER_NAME)
> .build("SHA1withRSA", privateKey, signingCertificate); and I add this 
> to my maven dependencies:
> <dependency>
> <groupId>org.bouncycastle</groupId>
> <artifactId>bcmail-jdk16</artifactId>
> <version>1.46</version>
> </dependency> I get the exception: java.lang.ClassNotFoundException: 
> org.bouncycastle.asn1.ASN1ObjectIdentifier If i add now this 
> additional to my pom:
> <dependency> <groupId>org.bouncycastle</groupId> 
> <artifactId>bcprov-ext-jdk16</artifactId> <version>1.46</version> 
> </dependency>
> I get this exception: java.lang.NoSuchFieldError: sha224WithRSAEncryption
>
> What can I do to fix that problem?
>
> Thanks,
> Florian Krauthan
>
> -- 
> Microsoft Outlook Signature
>
> 	
>
>
> *Florian Krauthan*
> Junior Software Developer
> P: +1.604.482.0090
> fkrauthan@hyperwallet.com <mailto:fkrauthan@hyperwallet.com>
>
> 	
>
> */
> /**/hyper/**WALLET Systems Inc*.
> Suite 300, 950 Granville St.
> Vancouver BC, V6Z 1L2
> P: +1 604.482.0090
> F: +1 604.482.0091
> Web <http://www.hyperwallet.com/> | Blog 
> <http://www.paymentstalk.com/> | Twitter 
> <http://www.twitter.com/hyperwallet>
>


[Attachment #3 (multipart/related)]

[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><br>
      Check your classpath. You'll find an earlier version of the
      provider in it.<br>
      <br>
      Regards,<br>
      <br>
      David<br>
      <br>
      On 08/12/12 12:17, Florian Krauthan wrote:<br>
    </div>
    <blockquote cite="mid:50C29547.5060000@hyperwallet.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hello,<br>
      If i use this code:<br>
      <pre><div class="line" id="LC112">			<span class="n">SignerInfoGenerator</span> \
<span class="n">signerInfoGenerator</span> <span class="o">=</span> <span \
class="k">new</span> <span class="n">JcaSimpleSignerInfoGeneratorBuilder</span><span \
class="o">()</span></div><div class="line" id="LC113">				<span \
class="o">.</span><span class="na">setProvider</span><span class="o">(</span><span \
class="n">BouncyCastleProvider</span><span class="o">.</span><span \
class="na">PROVIDER_NAME</span><span class="o">)</span></div><div class="line" \
id="LC114">				<span class="o">.</span><span class="na">build</span><span \
class="o">(</span><span class="s">"SHA1withRSA"</span><span class="o">,</span> <span \
class="n">privateKey</span><span class="o">,</span> <span \
class="n">signingCertificate</span><span class="o">);

and I add this to my maven dependencies:
</span><pre><div class="line" id="LC80">		<span \
class="nt">&lt;dependency&gt;</span></div><div class="line" id="LC81">			<span \
class="nt">&lt;groupId&gt;</span>org.bouncycastle<span \
class="nt">&lt;/groupId&gt;</span></div><div class="line" id="LC82">			<span \
class="nt">&lt;artifactId&gt;</span>bcmail-jdk16<span \
class="nt">&lt;/artifactId&gt;</span></div><div class="line" id="LC83">			<span \
class="nt">&lt;version&gt;</span>1.46<span \
class="nt">&lt;/version&gt;</span></div><div class="line" id="LC84">		<span \
class="nt">&lt;/dependency&gt;

I get the exception: java.lang.ClassNotFoundException: \
org.bouncycastle.asn1.ASN1ObjectIdentifier

If i add now this additional to my pom:
</span></div></pre>	&lt;dependency&gt;
            &lt;groupId&gt;org.bouncycastle&lt;/groupId&gt;
            &lt;artifactId&gt;bcprov-ext-jdk16&lt;/artifactId&gt;
            &lt;version&gt;1.46&lt;/version&gt;
        &lt;/dependency&gt;
</div></pre>
      I get this exception: java.lang.NoSuchFieldError:
      sha224WithRSAEncryption<br>
      <br>
      What can I do to fix that problem?<br>
      <br>
      Thanks,<br>
      Florian Krauthan<br>
      <br>
      <div class="moz-signature">-- <br>
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <meta name="ProgId" content="Word.Document">
        <meta name="Generator" content="Microsoft Word 9">
        <meta name="Originator" content="Microsoft Word 9">
        <link rel="File-List" href="./David%20Evans2_files/filelist.xml">
        <link rel="Edit-Time-Data"
          href="./David%20Evans2_files/editdata.mso">
        <!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
        <title>Microsoft Outlook Signature</title>
        <!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>devans</o:Author>
  <o:LastAuthor>devans</o:LastAuthor>
  <o:Revision>7</o:Revision>
  <o:TotalTime>36</o:TotalTime>
  <o:Created>2009-12-15T19:41:00Z</o:Created>
  <o:LastSaved>2009-12-15T19:50:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>80</o:Words>
  <o:Characters>458</o:Characters>
  <o:Company> </o:Company>
  <o:Lines>3</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>562</o:CharactersWithSpaces>
  <o:Version>9.2720</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
        <style>
<!--
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:#7CB642;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:#7CB642;
	text-decoration:underline;
	text-underline:single;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
.style1 {
	font-family: Arial;
	font-weight: bold;
	font-size: 8.0pt;
}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
        <div class="Section1">
          <table style="width:512.6pt;mso-cellspacing: 1.5pt"
            width="683" height="0" border="0" cellpadding="0">
            <tbody>
              <tr style="height:15.75pt">
                <td colspan="3" style="width:509.6pt;padding:.75pt .75pt
                  .75pt .75pt; height:15.75pt" width="679"
                  background="http://www.hyperwallet.com/img/borderhoriz.gif">
                  <p class="MsoNormal"><!--[if \
!supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>  </td>
              </tr>
              <tr style="height:15.75pt">
                <td style="width:195.35pt;padding:.75pt .75pt .75pt
                  .75pt; height:15.75pt" valign="top" width="260">
                  <p class="MsoNormal"><img id="_x0000_i1047"
                      src="cid:part1.09040401.07000205@autochthonous.org"
                      class="style9" width="192" height="55"></p>
                </td>
                <td style="width:187.5pt;padding:.75pt .75pt .75pt
                  .75pt; height:15.75pt" valign="top" width="250">
                  <p class="MsoNormal"><br>
                    <strong><span
                        style="font-size:8.0pt;font-family:Arial">Florian

                        Krauthan</span></strong><span
                      style="font-size:8.0pt;font-family:Arial"><br>
                      Junior Software Developer <br>
                      P: +1.604.482.0090<br>
                      <span class="style17"><a moz-do-not-send="true"
                          \
href="mailto:fkrauthan@hyperwallet.com">fkrauthan@hyperwallet.com</a></span></span><span
  style="font-size:8.0pt"> <o:p></o:p></span></p>
                </td>
                <td style="width:123.75pt;padding:.75pt .75pt .75pt
                  .75pt; height:15.75pt" valign="top" width="165">
                  <p class="MsoNormal"><b><i><span
                          style="font-family:Arial"><br>
                        </span></i></b><span class="style17"><b><i><span
                            style="font-size:8.0pt; \
font-family:Arial">hyper</span></i></b></span><span  class="style17"><b><span
                          style="font-size:8.0pt;font-family:Arial">WALLET

                          Systems Inc</span></b></span><span
                      class="style17"><span
                        \
style="font-size:8.0pt;font-family:Arial">.</span></span><span  \
                style="font-size:8.0pt;font-family:Arial"><br>
                      <span class="style17">Suite 300, 950 Granville St.</span><br>
                      <span class="style17">Vancouver BC, V6Z 1L2</span><br>
                      <span class="style17">P: +1 604.482.0090 </span><br>
                      <span class="style17">F: +1 604.482.0091</span><br>
                      <span class="style17"><a moz-do-not-send="true"
                          href="http://www.hyperwallet.com/"
                          target="_blank">Web</a> <span
                          style="mso-spacerun: yes">&nbsp;</span>| <span
                          style="mso-spacerun: yes">&nbsp;</span><a
                          moz-do-not-send="true"
                          href="http://www.paymentstalk.com/"
                          target="_blank">Blog</a> <span
                          style="mso-spacerun: yes">&nbsp;</span>| <span
                          style="mso-spacerun: yes">&nbsp;</span><a
                          moz-do-not-send="true"
                          href="http://www.twitter.com/hyperwallet"
                          target="_blank">Twitter</a> </span></span><span
                      style="font-size:8.0pt"><o:p></o:p></span></p>
                </td>
              </tr>
            </tbody>
          </table>
          <p class="MsoNormal"><span class="MsoHyperlinkFollowed"><!--[if \
!supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></span></p>  </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>


[Attachment #6 (image/gif)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic