Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to generate x.509 certificate?

 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

above code could create certChain.db as normal.however can't generate x.509 certificate to the output file- "certChain.db".
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "can't generate" mean? What exactly happens if you try?
 
Matteo Di Furia
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How comes you're reading (FileInputStream) and probably wanting to write (FileOutputStream) to the same file (C:\chainCert.db)?
Other than this, I don't know if I got correctly what you're asking, but if you don't write something in the output stream (oos.write(some_obj)) you'll get nothing in the file (remember to flush and close).
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Matteo Di Furia:
How comes you're reading (FileInputStream) and probably wanting to write (FileOutputStream) to the same file (C:\chainCert.db)?
Other than this, I don't know if I got correctly what you're asking, but if you don't write something in the output stream (oos.write(some_obj)) you'll get nothing in the file (remember to flush and close).

can't generate means i get nothing on the file (C:\chainCert.db).

actually i want to modify from following code


that is generate certificate before write oubject,after the oubject writeOut to file C:\chainCert.db,reading the cert from the file.
however i confuse by this code that i found from internet.it seams generateCert during read file,not before write out file.

[ October 03, 2008: Message edited by: L Willie ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic