Hi experts
I have generated a web serive stub client using eclipse (just downloaded the newest version)
My problem is that I have to use a https connection, hence I need to install a GlobalSign Certificate into my java Keytool.
I tried to follow the guideline from
http://www.globalsign.com/support/code-signing/codesign_sunjava.htmlhowever I cannot se how I can fulfill it since the "CN" parameter including my email is not excepted?
Here is what I done so far:
%java_home%\bin\keytool -genkey -alias codesigncert -keypass changeit -keyalg RSA -keysize 1024 -dname "CN=localhost,O=telmore" -keystore codesignstore -storepass changeit
%java_home%\bin\keytool -certreq -v -alias codesigncert -file codesigncsr.pem -keystore codesignstore
Enter keystore password: changeit
Enter key password for <codesigncert>changeit
C:\>more codesigncsr.pem
-----BEGIN NEW CERTIFICATE REQUEST-----
MIIBZTCBzwIBADAmMRAwDgYDVQ
QKEwd0ZWxt
b3JlMRIwEA
YDVQQDEwls
b2NhbGhvc3
QwgZ8wDQYJ
KoZIhvcNAQEBBQADgY0AMIGJAo
GBAMkYzu0v
rhzNrROwfY
FroAPZpBDx
BeDVSfr09H
ZD2dVBe/kD
Hp7CkocGBREH0y3QCDu6stcRMd
tGBfGthu9k
Trtsgy8vof
5S3lKYEOa5
weMjQxHFAb
L9ss8Ia2Zj
EF0KCUJDzk27AdW01PNmIDs4fX
fz76kDWSe3
z4hFQvkASR
yXAgMBAAGg
ADANBgkqhk
iG9w0BAQQF
AAOBgQCEwuZoaFEliDJdcO83My
0tFlqIpBbo
9OJCn0kJbQ
6yxVb+WJot
I4MhnjVdY4
S1hIPRbbsf
mWJczmgxFcQzbS7Vn8FddF2euh
chIySnSSWV
kO8I371iYl
601dJ4Vqf9
Zb9IQhSeF/
iwrJ1P4GEt
gpBBJFXAb8F30M4Ba85k/WKNGw
-----END NEW CERTIFICATE REQUEST-----
C:\>%java_home%\bin\keytoo
l -printcert -v -file codesigncsr.pem
sun.security.pkcs.ParsingE
xception: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.pkcs.PKCS7.pa
rse(PKCS7.
java:118)
at sun.security.pkcs.PKCS7.<i
nit>(PKCS7
.java:68)
at sun.security.provider.X509
Factory.pa
rseX509orP
KCS7Cert(X
509Factory
.java:530)
at sun.security.provider.X509
Factory.en
gineGenera
teCertific
ates(X509F
actory.jav
a:407)
at java.security.cert.Certifi
cateFactor
y.generate
Certificat
es(Certifi
cateFactor
y.java:511
)
at sun.security.tools.KeyTool
.doPrintCe
rt(KeyTool
.java:1021
)
at sun.security.tools.KeyTool
.doCommand
s(KeyTool.
java:539)
at sun.security.tools.KeyTool
.run(KeyTo
ol.java:12
4)
at sun.security.tools.KeyTool
.main(KeyT
ool.java:1
18)
Caused by: java.io.IOException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)
at sun.security.util.ObjectId
entifier.<
init>(Obje
ctIdentifi
er.java:13
4)
at sun.security.util.DerInput
Stream.get
OID(DerInp
utStream.j
ava:250)
at sun.security.pkcs.ContentI
nfo.<init>
(ContentIn
fo.java:11
7)
at sun.security.pkcs.PKCS7.pa
rse(PKCS7.
java:136)
at sun.security.pkcs.PKCS7.pa
rse(PKCS7.
java:115)
... 8 more
keytool error: java.lang.Exception: Failed to parse input
When I execute the java program I get the following exception:
nested exception is:
javax.net.ssl.SSLHandshake
Exception:
sun.security.validator.Val
idatorExce
ption: Certificate chaining error
Please help me with getting the VM to accept the certification (so that I can execute the program ).