-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gerhard Gappmeier wrote:
| Thanks for that tip.
|
| It works now this way:
|
| UaPkiCertificateInfo UaPkiCertificate::info() const
| {
[...]
| switch ( pName->type )
| {
| case GEN_OTHERNAME:
| break;
| case GEN_EMAIL:
| ASN1_STRING_to_UTF8((unsigned char**)&pBuffer,
| pName->d.ia5);
ia5String is basically ASCII, especially in email, since email addresses
are limited to the ASCII character set...
And every ASCII character is also a valid UTF-8 character...
| ret.eMail = pBuffer;
| OPENSSL_free(pBuffer);
| break;
| case GEN_DNS:
| ASN1_STRING_to_UTF8((unsigned char**)&pBuffer,
| pName->d.ia5);
also here...
| ret.DNS = pBuffer;
| OPENSSL_free(pBuffer);
| break;
| case GEN_X400:
| break;
| case GEN_DIRNAME:
| break;
| case GEN_EDIPARTY:
| break;
| case GEN_URI:
| ASN1_STRING_to_UTF8((unsigned char**)&pBuffer,
| pName->d.ia5);
and here...
| ret.URI = pBuffer;
| OPENSSL_free(pBuffer);
| break;
| case GEN_IPADD:
| ASN1_STRING_to_UTF8((unsigned char**)&pBuffer,
| pName->d.ia5);
here you are wrong.
the IP address is stored as binary.
So IPv4 -> 4 byte data, IPv6 -> 16 byte data...
Bye
Goetz
- --
DMCA: The greed of the few outweighs the freedom of the many
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIWWg62iGqZUF3qPYRAhaYAJ45hFKmn7Vm87KLaG9oS/SuopcFhACfWNrQ
CkV2vZpn+OzFacij2YxoRZ4=
=2Qz7
-----END PGP SIGNATURE-----
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]