GithubHelp home page GithubHelp logo

Comments (11)

TMSantos avatar TMSantos commented on July 17, 2024

hi @gmpassos , it seems EMAIL was deprecated at 1.2.840.113549.1.9.1:
Screenshot 2021-10-26 at 09 18 13

from dart-basic-utils.

Ephenodrom avatar Ephenodrom commented on July 17, 2024

Hello @gmpassos
As @TMSantos mentioned, the email attribute ist deprecated and some CA so mit accept it anymore.

Can you explain why you still need it?

from dart-basic-utils.

gmpassos avatar gmpassos commented on July 17, 2024

I was looking for the documentation of X509Utils.generateRsaCsrPem and could not find the attributes list. Then I went to Wikipedia.

Maybe we should fix the Wikipedia article...

from dart-basic-utils.

TMSantos avatar TMSantos commented on July 17, 2024

@gmpassos even thou this is depreacted, my client still requires it, I added this OI in a fork branch I have and it will work, if you are interested:

pointycastle:
git:
url: https://github.com/TMSantos/pc-dart.git
ref: email_oid

it will work with email , the DN attribute for the subject is 'E', the identifier is the follows:

{
'identifierString': '1.2.840.113549.1.9.1',
'readableName': 'E',
'identifier': [1, 2, 840, 113549, 1, 9, 1]
}

(As you can see in below table).

Final result:
Screenshot 2021-10-26 at 11 02 51

Note: as many dart libraries relies on pointycastle, you might need to add override on pubspec.yaml:

dependency_overrides:
pointycastle:
git:
url: https://github.com/TMSantos/pc-dart.git
ref: email_oid

from dart-basic-utils.

gmpassos avatar gmpassos commented on July 17, 2024

I'm trying to integrate LetsEncrypt (acme_client) and shelf.

The problem now is how to load the SecurityContext, since it requires a PKCS12 certificate chain. But all that I have is in PEM:

Unhandled exception:
TlsException: Failure in useCertificateChainBytes (OS Error: 
	BAD_PKCS12_DATA(pkcs8_x509.c:645), errno = 0)
#0      _SecurityContext.useCertificateChainBytes (dart:io-patch/secure_socket_patch.dart:241:56)
#1      _SecurityContext.useCertificateChain (dart:io-patch/secure_socket_patch.dart:237:5)

Do you know how to generate a PKCS12 chain with a List of PEM strings?

from dart-basic-utils.

TMSantos avatar TMSantos commented on July 17, 2024

it seems to be open issue flutter/flutter#39190 with http library, maybe alternative is to use HttpClient from dart directly (dart:io), instead of http from Flutter.

@gmpassos for EMAIL thing, according to RFC, EMAIL is replaced by subjectAltName (and this one is already supported):
image

from dart-basic-utils.

Ephenodrom avatar Ephenodrom commented on July 17, 2024

This package alread supports to convert a list of PEM to PKCS7. The next step would be to convert to PKCS12.

This is in the roadmap and I hope to implement it before the end of the year.

from dart-basic-utils.

gmpassos avatar gmpassos commented on July 17, 2024

Hi,

Do you know how to generate a self-signed RSA certificate using this package?

This can be used for local tests

from dart-basic-utils.

Ephenodrom avatar Ephenodrom commented on July 17, 2024

@gmpassos
Not yet, this is another point on the roadmap. It should not be so complicated at all, but first I have to check some documentation and look how openssl behaves.

from dart-basic-utils.

gmpassos avatar gmpassos commented on July 17, 2024

It's not much different from CSR

from dart-basic-utils.

Ephenodrom avatar Ephenodrom commented on July 17, 2024

@gmpassos Check Out #55 for the self signing certificate feature! Maybe I can finish it next week.

from dart-basic-utils.

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.