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

mbedtls_x509_string_to_names failed when names include some comma #368

Closed
Prochg opened this issue Dec 9, 2015 · 4 comments
Closed

mbedtls_x509_string_to_names failed when names include some comma #368

Prochg opened this issue Dec 9, 2015 · 4 comments

Comments

@Prochg
Copy link

Prochg commented Dec 9, 2015

mbedtls_x509_string_to_names use comma as the spilt of oid name,when some name include a comma it will faile with MBEDTLS_ERR_X509_UNKNOWN_OID.
such as: O=xxxx Co., Ltd ,CN=xxx

@mpg mpg added the question label Dec 9, 2015
@mpg
Copy link
Contributor

mpg commented Dec 9, 2015

I think you need to "escape" the embedded comma with a backslash. Otherwise there is no way for the function to guess what you mean.

@ciarmcom
Copy link

ciarmcom commented Dec 9, 2015

ARM Internal Ref: IOTSSL-568

@Prochg
Copy link
Author

Prochg commented Dec 9, 2015

i fixed it in other way.
it happen when i try get the subject name (mbedtls_x509_dn_gets) from a ssl-peer-cert and set to another cert (mbedtls_x509write_crt_set_subject_name).it should be work,i think.

@mpg
Copy link
Contributor

mpg commented Dec 10, 2015

Closing this issue then. Also, please note that mbedtls_x509_string_to_names() is an internal function (you can still use it if you choose to, but don't be surprised if it changes).

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

No branches or pull requests

3 participants