-
Notifications
You must be signed in to change notification settings - Fork 130
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
ber2der: Invalid BER format #20
Comments
Hi @Vespira, Thanks for the detailed bug report.
If you're able to use a non-production CA and save the CSR as well as dump the HTTP POST body to a file and attach them to the bug report, I can debug further and possibly submit a patch upstream. |
Hello @groob,
I will try my best to give you details of the communication between my client and server, and to attach these to the issue. |
I tried to use the specific JSCEP Android library (which basically just use spongycastle instead of bouncycastle for crypto operations); but it didn't changed anything, appart from the fact I now can get a 500 Internal Server error from the client after the enrol call. I made a TCP dump of the exchange between client and server, and also I took a screenshot of the object sent to the SCEP server (sorry I couln't just print it as text, the debbugger didnt allowed this) Thanks again for your help on this, it's very appreciated 👍 |
Would you be able to share the actual HTTP Post body saved to a file instead of the TCP log? |
@groob hi again, So here is my HTTP file log when I try to call the enrol method. I m also starting to read them, but I'm not sure of what's useful to get here... EDIT : ok I think I should have a look at the POST at the end, like you said, and maybe also to the HTTP query from the SCEP server, sending a content-type : application/x-x509-ca-cert to the application. in the POST body, where it tells us it have a content-length of 2777, I observed the first hexdump of the DER encoded certificate, and saw that we have the start SEQUENCE to '30 80'. The ber2der convert method display this error message if a specific byte is equal to 0x80 (I assume this is the byte coming just after the 0x30 indicating the start of the SEQUENCE). Maybe i'm saying a non-sense, I'll keep learning about how it works. |
Hi again, I'm back to try to solve the issue, the client works fine with your server by the way. If you only want the POST body I can paste it here, but as I was not sure if something is interesting aside, I copied the whole HTTP logs transaction. The POST body seems to be only this:
|
hi @Vespira I can't solve this without a reliable file to test against. Please upload a binary version of the http post body (save it to a file) instead of ASCII text here. |
I believe this is solved by #38 now. Please reopen if you can reproduce with master version. |
Hi,
First of all thanks for the very simple and low-sized sources for this SCEP Client & Server implementation :)
I made an Android native application using the latest (2.4.0) version of JSCEP library and I try to do an enrollment to your Go Scep server. But, I have an issue at some point. Let me describe you a little bit what I'm doing :
At first, I initialize a new CA certificate on a Linux server into a depot directory
Then, I start the SCEP server this way :
scepserver -depot depot -port 2016 -challenge=secret
Then, in my Android application I'm doing this :
When it comes to the enrol method from JSCEP Client, it generates a PKCSRequest and send it to the Go SCEP Server. But something may be wrong because I have the following error message :
We have some doubts about the compatibility between what is expecting the Go SCEP Server and what we are sending into the HTTP POST Request (we are afraid it's not mapped correctly). Basically, our PKCSRequest is containing :
However, when we just call the getCaCertificate method, the ca.cert from the depot is correctly returned.
certStore = client.getCaCertificate();
Do you have any idea of what can cause this error ?
Thanks a lot for your insight and you help !
The text was updated successfully, but these errors were encountered: