# opensll has no -sha256 option

**URL:** <https://forums.suse.com/t/opensll-has-no-sha256-option/29104>\
**Category:** SLES Configure-Administer\
**Created:** [December 8, 2016, 7:01pm UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104 "2016-12-08T19:01:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob\_collins](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@rob\_collins](https://forums.suse.com/u/rob_collins)\
**Post date:** [December 8, 2016, 7:01pm UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104/1 "2016-12-08T19:01:22Z")

</div>

I Need to generate a CSR for a product running on my SLES 11 SP4 server. When I try the openssl command to generate a csr it only allows sha1 and no -ssh256 is available.

How do I get this to work. I have enabled the security module and done a zypper up with no luck. even tried adding openssl1.

please help.

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [December 8, 2016, 7:50pm UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104/2 "2016-12-08T19:50:04Z")

</div>

On 08/12/16 17:04, rob collins wrote:  
[color=blue]

> I Need to generate a CSR for a product running on my SLES 11 SP4 server.  
> When I try the openssl command to generate a csr it only allows sha1 and  
> no -ssh256 is available.[/color]

I presume “-ssh256” above is a typo and you mean “-sha256”?  
[color=blue]

> How do I get this to work. I have enabled the security module and done a  
> zypper up with no luck. even tried adding openssl1.[/color]

By your reference to “openssl1” above do you mean “openssl1 -sha256”  
doesn’t work?

I don’t have a SLES11 SP4 server to hand but can install a virtual one  
tomorrow if necessary.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![rob\_collins](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@rob\_collins](https://forums.suse.com/u/rob_collins)\
**Post date:** [December 9, 2016, 10:00am UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104/3 "2016-12-09T10:00:10Z")

</div>

HI Simon,

That is correct yes. When I run openssl1 or openssl with the option -sha256 included for creating a sha256 csr as the default “openssl req -new -key www.mydomain.com.key -out www.mydomain.com.csr” creates a SHA1 CSR and I need a CSR2 so the documentation says add the -sha256 option “openssl req -new -sha256 -key www.mydomain.com.key -out www.mydomain.com.csr” just brings up the help for openssl showing that -sha256 does not exist.

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [December 9, 2016, 6:45pm UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104/4 "2016-12-09T18:45:36Z")

</div>

On 09/12/16 08:04, rob collins wrote:  
[color=blue]

> That is correct yes. When I run openssl1 or openssl with the option  
> -sha256 included for creating a sha256 csr as the default “openssl req  
> -new -key [www.mydomain.com.key](https://www.mydomain.com.key) -out www.mydomain.com.csr” creates a SHA1  
> CSR and I need a CSR2 so the documentation says add the -sha256 option  
> “openssl req -new -sha256 -key [www.mydomain.com.key](https://www.mydomain.com.key) -out  
> www.mydomain.com.csr” just brings up the help for openssl showing that  
> -sha256 does not exist.[/color]

Hmm I have now installed a test SLES11 SP4 server with Security Module  
enabled and the openssl1 package installed and it seems I am able to  
create requests with ‘-sha256’. Basically I’m using your command above  
but with ‘-newkey rsa:2048 -keyout’ instead of ‘-key’ (to create new  
rather than use an existing since I don’t have one) - command I used was  
‘openssl req -new -sha256 -newkey rsa:2048 -keyout example.key -out  
example.csr’.

Note I don’t get an error whether using openssl or openssl1 command.

Using ‘openssl req -text -noout -verify -in example.csr’ shows  
‘Signature Algorithm: sha256WithRSAEncryption’

Could it be that your key is not using RSA encryption and that’s why  
it’s failing?

Since server was freshly installed it is fully patched:

openssl-0.9.8j-0.102.2  
openssl1-1.0.1g-0.52.1

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![rob\_collins](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@rob\_collins](https://forums.suse.com/u/rob_collins)\
**Post date:** [December 12, 2016, 10:03am UTC](https://forums.suse.com/t/opensll-has-no-sha256-option/29104/5 "2016-12-12T10:03:17Z")

</div>

Brilliant thanks Simon.

That worked.
