Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i have a problem during use you code to access chef server api #1

Open
feixiong2015 opened this issue Oct 28, 2015 · 4 comments
Open

Comments

@feixiong2015
Copy link

can you tell me in your code which jar you rely on
{"error":["Invalid signature for user or client 'chefclient01.domain.com'"]}

@charleyw
Copy link
Owner

If you using maven, you can install all the dependency via mvn install.
Or you can refer to this file: https://github.com/charleyw/chef-api-java/blob/master/pom.xml, please see the dependency block for each jars details.

@feixiong2015
Copy link
Author

你好 ,我确实根据pom.xml文件找到了对应的Jar包,但是 我发现org.bouncycastle.jce.provider.BouncyCastleProvider
org.bouncycastle.util.encoders.Base64这两个依赖的类不在bcprov-jdk15on-1.47.jar文件中。如果使用别的jar的话依然会存在{"error":["Invalid signature for user or client 'chefclient01.domain.com'"]}的问题。希望您能帮下。谢谢

@charleyw
Copy link
Owner

charleyw commented Nov 2, 2015

我这个是好几年前写的了,不确定还能不能用。
有可能是有一个依赖没有自动加进去:

<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15on</artifactId>
    <version>1.47</version>
</dependency>

我更新了一下代码,但是我本地没有测试环境,你可以更新一下代码试试看

@feixiong2015
Copy link
Author

谢谢啊,太好了,问题我已经解决了。代码没有什么问题,问题出在JDK上,chef目前支持oracle的jdk,我用的是ibm所以无论怎么解决都验证不过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@charleyw @feixiong2015 and others