Security

Parameters must be in the form '-parameter value' error when trying to sign certificate.

CaptainHook
Communicator

Does anyone have an idea on why I am returning the following error:
Parameters must be in the form '-parameter value'

When trying to run the below command
$SPLUNK_HOME/bin/splunk cmd openssl x509 -req -in myCACertificate.csr -sha512
-signkey myCAPrivateKey.key -CAcreateserial -out myCACertificate.pem -days 1095

Reference: http://docs.splunk.com/Documentation/Splunk/7.0.2/Security/Howtoself-signcertificates

Thank you.

0 Karma

sloshburch
Splunk Employee
Splunk Employee

I'm guessing the docs could have a typo on the parameter. I would suggest doing a divide and conquer. Chop off half the params and see if the same syntax message comes up. If yes, then cut in half again. If no, then use the other half. Repeat until you identify which parameter is causing the problem. Then we can pinpoint if the docs are wrong or if we made a typo in the cmd.

0 Karma

deepashri_123
Motivator

Hey CaptainHook,

Make sure the splunk home path entered is correct and try running the command:

$SPLUNK_HOME/bin/splunk cmd openssl x509 -req -in
myServerCertificate.csr -SHA512 -CA myCACertificate.pem -CAkey myCAPrivateKey.key
-CAcreateserial -out myServerCertificate.pem -days 1095

In your above command the certificate is missing

0 Karma

somesoni2
Revered Legend

Try to type in the command instead of copying from Splunk documentation page (or anywhere else you're copying from).

0 Karma

CaptainHook
Communicator

Thanks somesoni2, Yeah, I thought of that too and it still didn't work manually typing it in.

0 Karma

elliotproebstel
Champion

Is that a direct copy/paste from where you're trying to run it? Any chance any of those values actually contain spaces? Spitballing here.

0 Karma

CaptainHook
Communicator

Hello Elliotproebstel and thank you for your response. I did actually type in the command and NOT copy/paste it. I had tried it both ways prior to posting the question.

0 Karma

elliotproebstel
Champion

Sorry, I know you said above that you'd typed it directly into your command line. I was trying to ask if you had copied directly from the command line into your post, since there was nothing I could see that was askew. Sometimes people transcribe and, in the process of transcribing, accidentally obfuscate what was going wrong.

0 Karma

CaptainHook
Communicator

I misunderstood your response, sorry about that. Yes, I did copy the command from the CL to this post.

0 Karma

CaptainHook
Communicator

Does anybody have any other ideas or thoughts? Thanks in Advance.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...