# OPENSSL accidentally deleted newca



## wgbit (Jan 11, 2010)

Hi all,

i was trying to make a certificate openssl when i accidentally deleted the new* .. any chance I could get it back? I tried to deinstall the openssl and reinstall but it never showed up, need help, thanks in advance.


----------



## anomie (Jan 11, 2010)

What are you talking about? 

`% openssl ca ...`

? 

If so, you could cast a _really_ wide net and rebuild world. If I knew more about the base system and how it's built, I could probably give you more specific advice.


----------



## ohauer (Jan 11, 2010)

If you have the FreeBSD sources installed, you can find the scripts here:

/usr/src/crypto/openssl/apps/CA.pl
/usr/src/crypto/openssl/apps/CA.sh


If you have installed openssl from ports, look in /usr/local/openssl/misc/
there you should find the CA.* scripts to build a new CA.


----------



## ohauer (Jan 11, 2010)

I guess you mix something, there is normally no newca* script.
newca is a parameter for the CA.pl or CA.sh script.

Locate one of the CA.pl or CA.sh script and then look into the script with more or less.


```
#!/usr/bin/perl
#
# CA - wrapper around ca to make it easier to use ... basically ca requires
#      some setup stuff to be done before you can use it and this makes
#      things easier between now and when Eric is convinced to fix it :-)
#
# [B]CA -newca[/B] ... will setup the right stuff
# CA -newreq[-nodes] ... will generate a certificate request
# CA -sign ... will sign the generated request and output
#
# At the end of that grab newreq.pem and newcert.pem (one has the key
# and the other the certificate) and cat them together and that is what
# you want/need ... I'll make even this a little cleaner later.
```


----------



## wgbit (Jan 12, 2010)

*Solved*

thanks for the reply guys, i had it deinstalled, clean and installed, everything went back easily.


----------

