Merge pull request #292 from octobot-dev/increment-rsa-key-length
Enhancement: Increment RSA key size to 2048.
This commit is contained in:
commit
4c7bddfd02
1 changed files with 1 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
from Cryptodome.PublicKey import RSA
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from oidc_provider.models import RSAKey
|
||||
|
||||
|
||||
|
@ -9,7 +8,7 @@ class Command(BaseCommand):
|
|||
|
||||
def handle(self, *args, **options):
|
||||
try:
|
||||
key = RSA.generate(1024)
|
||||
key = RSA.generate(2048)
|
||||
rsakey = RSAKey(key=key.exportKey('PEM').decode('utf8'))
|
||||
rsakey.save()
|
||||
self.stdout.write(u'RSA key successfully created with kid: {0}'.format(rsakey.kid))
|
||||
|
|
Loading…
Reference in a new issue