Coder Social home page Coder Social logo

Comments (11)

avonwyss avatar avonwyss commented on June 26, 2024

Can you give more information about the problem? What does AutoACME output (maybe with the --verbose switch)?

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

Thanks for fast response.
AutoAcme exports files, but Unreal Media Server doesn't accept them.
PEM file:
Dim pemFileName = Path.Combine(My.Settings.pemFolder, dr.Hostname & ".pem")
Using f = File.CreateText(pemFileName)
f.Write(cert.ToPem(privateKey))
End Using
PEM file in new version contains three certificates, while old version contained one only.

CRT file:
Dim derData = New Security.Cryptography.X509Certificates.X509Certificate2(cert.Certificate.ToDer)
Dim crtFileName = Path.Combine(My.Settings.pemFolder, dr.Hostname & ".crt")
Using f = File.CreateText(crtFileName)
f.WriteLine("-----BEGIN CERTIFICATE-----")
f.WriteLine(Convert.ToBase64String(derData.GetRawCertData, Base64FormattingOptions.InsertLineBreaks))
f.WriteLine("-----END CERTIFICATE-----")
End Using
I am not sure with this code.

I also don't know which one from certificates is wrong (maybe both).

Mirek

from autoacme.

avonwyss avatar avonwyss commented on June 26, 2024

Ah, that makes sense then. This is not related to V1/V2 but was separate issue #24 which asked for a full chain. Currently there is no setting to control the behavior, maybe this should be added in order to fix your problem.

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

I will check noticed issue #25
Thank you
Mirek

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

I have checked issue #25 and it didn't help me a lot.
It is so difficult for me.
As I have PFX file, I tried to export CRT and PEM from it - https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/.
I was successful doing this with AlpiroSSL certificate, but I was unsuccessful doing this with LetsEncrypt PFX. I got error in last step:
C:\WINDOWS\system32>"C:\Program Files\OpenSSL-Win64\bin\openssl" rsa -in C:\CertStore\PFX\admin.xxx.cz.key -out C:\CertStore\PFX\admin.xxx.cz.pem Enter pass phrase for C:\CertStore\PFX\admin.xxx.cz.key: 72788:error:0607907F:digital envelope routines:EVP_PKEY_get0_RSA:expecting an rsa key:crypto\evp\p_lib.c:469:

Would you be so kind to point me to right information sources to solve this task?

Thank you
Mirek

from autoacme.

avonwyss avatar avonwyss commented on June 26, 2024

@mmsw-git Note that you seem to have looked into the wrong issue, it's #24 and not #25.

The very first certificate in the CRT file is the one you're after, e.g. everything up to and including the first ----END CERTIFICATE----- in the CRT file. Can you delete everything after that line, save the CRT file, and test whether that CRT/PEM can then be imported by Unreal Media Server?

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

I have seen #24. It was only written mistake :-).
Thank you very much for advice about CRT - I can try it.
But I am afraid I have more serious problem exporting RSA Private Key.

from autoacme.

avonwyss avatar avonwyss commented on June 26, 2024

The PEM file is unchanged, the certificate chain is only there to allow checking the certificate (e.g. intermediate certificates up to the root certificate). FOr more information you can read https://en.wikipedia.org/wiki/X.509#Certificate_chains_and_cross-certification
In older versions AutoACME would generate the same PEM and CER file, the new version just appends the intermediate certificates to the CER file, nothing else.

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

I used this code to export Private Key:
acmeCert.Key.Save(file)
I don't see similar possibility in new version.

from autoacme.

avonwyss avatar avonwyss commented on June 26, 2024

I must admit that I'm having trouble following you. Why and where would you have used acmeCert.Key.Save? The key is saved here:

That being said, I don't see a problem with AutoACME right now, so I'm closing the issue (you may still comment on it of course).

from autoacme.

mmsw-git avatar mmsw-git commented on June 26, 2024

Thank you very much for your help.
Mirek

from autoacme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.