Limiting the voucher code to 6 characters
-
Hello
I am running pfsense 2.5.1 and for practical reason I need to shorten the voucher code lenght in the captive portal to 6 characters.
Is there a practical way to do that?
Thanks -
I have tried the method in the forum to generate new private key using the command line:
openssl genrsa 30 > key.private
But when I try to retrive the key with the command :
cat key.private
I get the following system error :
Generating RSA private key, 30 bit long modulus (2 primes)
34371026944:error:04081078:rsa routines:rsa_builtin_keygen:key size too small:/build/ce-crossbuild-251/sources/FreeBSD-src/crypto/openssl/crypto/rsa/rsa_gen.c:78:same thing for the key.public
I have tried to change the 30 value to a longer size but same issue
That methos was working with previous release of pfsense
-
Looking at error:04081078 it is somthing that is build in the FreeBSD system and it require a 512 bit minimu key lenght.
So maybe the solution will be to generate a key with another system that accept 30 bit lenght ?????
Any ideas welcome -
@pierrelyon the issue does not come from pfsense, but from openssl itself
Netgate found a workaround : use PHP to generate the keys instead of patching openssl
you could use this workaround too
more info here : https://redmine.pfsense.org/issues/9443
and
https://github.com/openssl/openssl/commit/cac19d19e7d6f252ff9aea60d85e0c0fd71a117f -
Finally I found out a workaround
I have another pfsense box with version 2.4.5 and on that one I was able to generate a short private and public key .
So I copy paste them to the 2.5.1 box ... and bingo it works !
Six character long voucher code