|
|
|
@ -272,12 +272,19 @@ namespace openssl { |
|
|
|
|
/* @bug http://albistechnologies.com reports: «could be a
|
|
|
|
|
failure in openSSL: len too short by 1 if serial number |
|
|
|
|
starts with 00 ASN1_INTEGER* ser = |
|
|
|
|
X509_get_serialNumber(_x509);» */ |
|
|
|
|
ASN1_INTEGER* ser(X509_get_serialNumber(_x509)); |
|
|
|
|
//! @todo requires memory free?
|
|
|
|
|
/*! @todo ser->type?!? http://albistechnologies.com prepends
|
|
|
|
|
tag and length in the first two char-fields. */ |
|
|
|
|
return std::string((char*)ser->data, ser->length); |
|
|
|
|
X509_get_serialNumber(_x509);» |
|
|
|
|
@code |
|
|
|
|
ASN1_INTEGER* ser(X509_get_serialNumber(_x509)); |
|
|
|
|
return std::string((char*)ser->data, ser->length); |
|
|
|
|
@endcode |
|
|
|
|
- requires memory free? |
|
|
|
|
- ser->type?!? http://albistechnologies.com prepends
|
|
|
|
|
tag and length in the first two char-fields. */ |
|
|
|
|
unsigned char* c(0); |
|
|
|
|
int len(i2d_X509(_x509, &c)); |
|
|
|
|
std::string res((char*)c+15, c[14]); |
|
|
|
|
OPENSSL_free(c); |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
//! Get id.
|
|
|
|
|
std::string id() const { |
|
|
|
|