-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http/500 when requesting certificate #82
Comments
Thanks for your Bugreport! I can reproduce the issue and I'm working on a fix. In the mean time, this patch also fixes the issue: --- a/ca/django_ca/utils.py
+++ b/ca/django_ca/utils.py
@@ -50,6 +50,7 @@ from cryptography.x509.oid import NameOID
from django.core.files.storage import get_storage_class
from django.core.validators import URLValidator
+from django.utils import timezone as tz
from django.utils.translation import gettext_lazy as _
from . import ca_settings
@@ -1162,6 +1177,8 @@ def get_cert_builder(expires: datetime, serial: Optional[int] = None) -> x509.Ce
if serial is None:
serial = x509.random_serial_number()
+ if tz.is_aware(expires):
+ expires = tz.make_naive(expires)
if expires <= now:
raise ValueError("expires must be in the future")
|
hi @mathiasertl after applying patch my setup are working fine, thanks for quick response. |
hi @jacekjaros, Fixed in c8ed135 (and forgot to mention that in the commit message). This will be in 1.20, for which I'm actually just finishing documentation updates. kr, Mat |
Hello, need to be completed :
Resolved with: --- a/ca/django_ca/management/base.py 2023-04-02 10:07:46.267345675 -0400
+++ b/ca/django_ca/management/base.py 2023-04-02 10:06:31.622540000 -0400
@@ -31,7 +31,7 @@
from django_ca.management import actions, mixins
from django_ca.models import CertificateAuthority
from django_ca.profiles import Profile
-from django_ca.utils import NAME_OID_MAPPINGS
+from django_ca.utils import NAME_OID_MAPPINGS, make_naive
class BinaryOutputWrapper(OutputWrapper):
@@ -265,6 +265,7 @@
"""Additional tests for validity of some options."""
expires = profile.get_expires(expires)
+ ca.expires = make_naive(ca.expires)
if ca.expires < expires:
max_days = (ca.expires - timezone.now()).days |
@noelmartinon Thanks for the report, and I've re-opened the issue! Please note that in general maintainers won't notice comments on closed issues, I spotted this by chance. It's usually better to open a new issue. |
@noelmartinon I believe the issue is fixed in the current main branch. You you cloned the source from git, you're welcome to try it out,otherwise the next release (mid May) will include the fix! If you have further feedback, please feel free to comment! |
i see following error when try to request certificate:
cert request:
my setup:
The text was updated successfully, but these errors were encountered: