Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSAKeyParser returns null when key uses CRLF line endings #36

Closed
wederchr opened this issue Apr 26, 2019 · 2 comments · Fixed by #38
Closed

RSAKeyParser returns null when key uses CRLF line endings #36

wederchr opened this issue Apr 26, 2019 · 2 comments · Fixed by #38
Assignees
Labels
enhancement New feature or request

Comments

@wederchr
Copy link
Contributor

wederchr commented Apr 26, 2019

The RSAKeyParser fails to parse a key that contains CRLF line endings. There is even a comment in the parse method.

/// RSA PEM parser.
class RSAKeyParser {
  /// Parses the PEM key no matter it is public or private, it will figure it out.
  RSAAsymmetricKey parse(String key) {
    final rows = key.split('\n'); // LF-only, this could be a problem
    final header = rows.first;
    
@wederchr wederchr changed the title RSAKeyParser fails when key is CRLF format RSAKeyParser returns null when key uses CRLF line endings Apr 26, 2019
@leocavalcante leocavalcante added the enhancement New feature or request label Apr 26, 2019
@leocavalcante
Copy link
Owner

It is on 3.1.0 now https://pub.dev/packages/encrypt/versions/3.1.0
Thanks

@wederchr
Copy link
Contributor Author

Great, thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants