Sdk: Add a `data` getter to X509Certificate

Created on 14 May 2018  路  12Comments  路  Source: dart-lang/sdk

Add a data getter to X509Certificate that returns the DER encoded bytes of the certificate from i2d_X509() as an UnmodifiableUint8List.

This is to enable SSL pinning.

/cc @mit-mit @a-siva

area-library library-io type-enhancement

Most helpful comment

Hi,
what about public key pinning (HPKP). Can the SecurityContext validate a public key instead of a certificate? This is more future proof as certificate pinning comes with issues of certificate expiry
Cheers

All 12 comments

https://dart-review.googlesource.com/c/sdk/+/55505

I'll land after adding a getter for the sha1, which is what I think you mean by fingerprint.

It should make it in the next roll into Flutter top-of-tree. I'll link the pull request to follow when it shows up.

Is this available in the beta release of Flutter yet? or where can I pull this source?

Sorry for not updating. This is now available in Flutter.

I'm pretty new to flutter. Can someone point me towards a tutorial or a doc that describes how to use this.

HA!.. no I didn't. because I didn't see it. thx

Hi,
what about public key pinning (HPKP). Can the SecurityContext validate a public key instead of a certificate? This is more future proof as certificate pinning comes with issues of certificate expiry
Cheers

any update on SSL pinning with public key?

Can we file a new feature request for SLL pinning with public key, this issue was opened for adding 'data' getter which is done and the issue closed.

issue opened for ssl public key pinning support. https://github.com/dart-lang/sdk/issues/35981

Was this page helpful?
0 / 5 - 0 ratings