M_ASN1_I2D_finish();
}
-SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp,
+SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char * const *pp,
long length)
{
int version,ssl_version=0,i;
((unsigned long)os.data[1]<< 8L)|
(unsigned long)os.data[2];
}
- else if ((ssl_version>>8) == 3)
+ else if ((ssl_version>>8) == SSL3_VERSION_MAJOR)
{
if (os.length != 2)
{
ret->cipher_id=id;
M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);
- if ((ssl_version>>8) == SSL3_VERSION)
+ if ((ssl_version>>8) == SSL3_VERSION_MAJOR)
i=SSL3_MAX_SSL_SESSION_ID_LENGTH;
- else /* if (ssl_version == SSL2_VERSION) */
+ else /* if (ssl_version == SSL2_VERSION_MAJOR) */
i=SSL2_MAX_SSL_SESSION_ID_LENGTH;
if (os.length > i)
os.length = i;
- if (os.length > (int)sizeof(ret->session_id)) /* can't happen */
- os.length = sizeof(ret->session_id);
+ if (os.length > sizeof ret->session_id) /* can't happen */
+ os.length = sizeof ret->session_id;
ret->session_id_length=os.length;
- OPENSSL_assert(os.length <= (int)sizeof(ret->session_id));
+ OPENSSL_assert(os.length <= sizeof ret->session_id);
memcpy(ret->session_id,os.data,os.length);
M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);