Replies: 8 comments
-
I'm not sure what you mean. Can you give an example (or show the example you saw using proc_open) what should be accomplished? Elliptic Curve Parameters: the generateECKey function accepts all the named curves supported by PHP but Let's Encrypt only supports P-256 (prime256v1) and P-384 (secp384r1) curves. You can get a full list by running this code: print_r(openssl_get_curve_names()); Diffie-Hellman Parameters: Do you mean generating DH-params like this: openssl dhparam -out dhparams.pem 4096 ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response; here's what I found but not working on some shared hostings `
} /**
} |
Beta Was this translation helpful? Give feedback.
-
The "Elliptic Curve Parameters"-example generates only the curve name, for example if you run the following code: echo getEcParameters('prime256v1'); it outputs:
which only contains the curve name: (you can decode it using:
The generateECKey function on the other hand creates an EC private key using the specified curve name, for example: echo $ac->generateECKey('prime256v1'); (which is equivalent to using it outputs something like:
which is an EC key based on the curve 'prime256v1', which can be used as account key or private key for a certificate. Unfortunately the "Diffie-Hellman Parameters"-example can't be implemented using PHP only without using something like proc_open or similar (there is no function for it in the OpenSSL extension) |
Beta Was this translation helpful? Give feedback.
-
in other words, the function getEcParameters() isn't necessarily useful since we already have the method generateECKey() which does much more. As for the getDhParameters() , You agree it's useful though can't be generated or rewritten in pure simple PHP without using functions which often are disabled in some hosting Servers. Okay now I have written a few conditions which runs getDhParameters() only when the necessary needed functions are available. What am yet to figure out is how to apply it's output. From my little observation, it produces similar output as the generateECKey() and generateRSAKey but how do I use it's output ? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Hello Am in here again, sorry if you feel disturbed BUT i really need a portion of your wealth of experience just a little. Have got an idea (kinda of though untested yet) on how to totally almost avoid hitting Rate Limits BUT I need know at what point exactly such requests are made which after a couple of times, could hit such limits. For instance, what url end-point is visited. What am looking to do is, if I know what method is run and what url end-point the request is sent to, I could embed my function / idea along it's path so my function / idea makes the decision of deciding on where such requests should be done or not. Am trying to guess the method private $this->register() which I have recreated as a protected method $this->_register() is what I should be looking for BUT i still would be much confident and sure hearing it from someone much experienced. Thanks in Advance |
Beta Was this translation helpful? Give feedback.
-
It may be useful in general, but not in the context of ACMECert directly, since it is all about getting a certificate but not configuring the web server itself.
The output of getDhParameters() can be set in the webserver configuration to use these custom DH parameters for the key exchange. For nginx you can use
Just append the DH parameters to the existing certificate file. The resulting file should look like this:
Or when using apache>=2.4.8 (and openssl>=1.0.2) you can also use something like:
|
Beta Was this translation helpful? Give feedback.
-
When you run ACMECert, it outputs each visited url end-point. It is not possible to tell if a rate limit is reached by only looking at the visited urls/invoked methods, since it depends on other factors as well. For example when creating a new order The register function you mentioned would count against the "Accounts per IP Address"-limit. There are also different rate limits for the live and staging environment. When using: $ac=new ACMECert(); the live environment is used: https://acme-v02.api.letsencrypt.org/ rate limits for live environment: https://letsencrypt.org/docs/rate-limits/ or when using: $ac=new ACMECert(false); the staging environment is used: https://acme-staging-v02.api.letsencrypt.org/ rate limits for staging environment: https://letsencrypt.org/docs/staging-environment/#rate-limits So there is no easy way to dertermine whether a rate limit is reached without considering a lot of factors. |
Beta Was this translation helpful? Give feedback.
-
I am moving this conversation to the discussion section, since it is not really an issue concerning ACMECert. |
Beta Was this translation helpful? Give feedback.
-
How do we make this script support
Elliptic Curve Parameters
Diffie-Hellman Parameters
I believe it would be much beneficial to all users of this script.
saw an implementation but uses proc_open , proc_close , etc most of which are disabled in some hosting.
Beta Was this translation helpful? Give feedback.
All reactions