45 lines
796 B
Plaintext
45 lines
796 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,php]
|
|
----
|
|
$config = array(
|
|
"digest_alg" => "sha512",
|
|
"private_key_bits" => 1024, // Noncompliant
|
|
"private_key_type" => OPENSSL_KEYTYPE_RSA,
|
|
);
|
|
$res = openssl_pkey_new($config);
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,php]
|
|
----
|
|
$config = array(
|
|
"digest_alg" => "sha512",
|
|
"private_key_bits" => 2048 // Compliant
|
|
"private_key_type" => OPENSSL_KEYTYPE_RSA,
|
|
);
|
|
$res = openssl_pkey_new($config);
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|