Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to create an SSL cert for the first time. I have no idea how this works and am simply following some instructions provided to me.

first command works fine:

openssl genrsa -des3 -out privkey.key 2048

then the second command is giving me the errors:

openssl req –new –nodes -key privkey.key –out server.csr

it says "unknown option -new" and then lists all of the options, one of which is of course "-new"

Google the error message only gives me one useful forum post which says I need to use the -config option to point to my openssl.cnf file. SO I searched for the only instance of openssl.cnf is in my XAMPP installation.

this gave me additional "unknown option" errors, depnding on where in the command I put the -config option.

openssl req -config /Applications/XAMPP/xamppfiles/share/openssl/openssl.cnf 
-key privkey.key –out server.csr -new -nodes

this gives me "unknown option -out" which is ridiculous.

Can someone help me with the order of commands, or let me know if there are known bugs with the XAMPP openssl command?

I'm running OSX Lion and XAMPP 1.7.3

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

Ok, this is kind of weird, but you're not going insane.

Copying and pasting yours example fails for me in the same way that it does for you. But typing it manually works fine.

It looks like wherever you copied those lines from has swapped the regular dash symbol with another, similar looking glyph. In fact, if you look very closely you can tell that the dash used with -key looks slightly different than the ones for -new, -nodes and -out (with the font I'm using the correct one is slightly shorter).

Delete all of your dashes and re-type them on the command line.

share|improve this answer
    
Nice catch! Let's hear it for the good old days of ASCII, when one dash was enough for us all <grin>. –  MadHatter Aug 14 '11 at 5:29
    
Jeez, I thought those dashes looked slightly longer but not long enough to be em dashes. Never would have gotten this. Wow. I blame Entourage. –  PetroleumJelliffe Aug 15 '11 at 1:52
    
thanks bahamat, you saved me so much time with that answer, love your work :) –  Armin Nehzat Jul 5 '13 at 6:55
add comment

when you wish to copy and paste! the - in the out so use arrows to get there and remove - and then type - and press enter, the - near the out is the only - you need to delete and type then it works :D

share|improve this answer
    
This is exactly what the existing answer said. I don't see that you've added anything here? –  Michael Hampton Dec 11 '13 at 2:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.