Hello,
I have to work with a pre-existing code which simulated handshake, data
encryption etc ...
certificate struct is defined like in the source code I reuse :
template<class StrType> struct certificate : shared {
StrType uri;
StrType sn;
StrType data;
certificate(const char *str, size_t clen=0) {
string s_uri,s_sn,s_data;
parseCertificate(str, s_uri,s_sn,s_data);
uri = s_uri.c_str();
sn = s_sn.c_str();
data = s_data.c_str();
}
...
etc
};
my questions :
1) What does DER format means ? is it equivalent to a string format ?
In the following function, we have a parameter named "out" : int
i2d_X509(X509 *x, unsigned char **out); this function convert X509 internal
data into DER format. Result is stored in "out" That's why I am wondering if
DER <=> string ... ?
2) is it possible to verify ( by hand ) certificate in string format ?
3) what kind of data structure ( vector, etc..) is the best way to store
certificate with string format ?
4) is a bad idea to handle everywhere certificates in string format ?
Thanks for your help.