Comments (11)
hi @gmpassos , it seems EMAIL was deprecated at 1.2.840.113549.1.9.1:
from dart-basic-utils.
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.
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.
@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).
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.
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.
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):
from dart-basic-utils.
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.
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.
@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.
It's not much different from CSR
from dart-basic-utils.
@gmpassos Check Out #55 for the self signing certificate feature! Maybe I can finish it next week.
from dart-basic-utils.
Related Issues (20)
- BooleanUtils not exported on basic_utils.dart HOT 2
- deactivate SSL for HTTP calls
- X509 Basic Constraints and PolicyInformation HOT 1
- Feature: camelCase to slug
- Support for a custom "Not Before" date for the validity of self signed X.509 certificates HOT 5
- Crypto: Type 'ASN1Sequence' is not a subtype of type 'ASN1Integer'
- CryptoUtils.generateRSAKeyPair takes a lot of time on Web HOT 1
- parsePkcs12 generating an incorrect private key
- Error: 'RC2Parameters' is imported from both HOT 1
- UnsupportedObjectIdentifierException: ObjectIdentifier prime192v1 is not supported yet HOT 1
- No algorithm registered of type ECDomainParameters with name: ansip256k1 HOT 2
- throw exception HOT 1
- nextInt misuse on CryptoUtils HOT 1
- UnsupportedASN1TagException: Tag 175 is not supported yet HOT 1
- Dart 3 Support HOT 2
- Exception (type 'ASN1Object' is not a subtype of type 'ASN1Sequence' in type cast) HOT 5
- generateSelfSignedCertificate in windows certificate invalid HOT 6
- Private key invalid HOT 2
- Non Expiring self-signed cert HOT 1
- Converting ECPrivateKey SEC1 to PCKS8 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-basic-utils.