simplify: use s2n macro
authorBodo Möller <bodo@openssl.org>
Mon, 3 Apr 2006 13:07:18 +0000 (13:07 +0000)
committerBodo Möller <bodo@openssl.org>
Mon, 3 Apr 2006 13:07:18 +0000 (13:07 +0000)
ssl/t1_lib.c

index 35d9e6d..d755886 100644 (file)
@@ -230,10 +230,8 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
                        }
                
                s2n(TLSEXT_TYPE_elliptic_curves,ret);
-
-               s2n(s->tlsext_ellipticcurvelist_length + 2,ret);
-               *(ret++) = (unsigned char) ((s->tlsext_ellipticcurvelist_length >> 8) & 0xFF);
-               *(ret++) = (unsigned char) (s->tlsext_ellipticcurvelist_length & 0xFF);
+               s2n(s->tlsext_ellipticcurvelist_length + 2, ret);
+               s2n(s->tlsext_ellipticcurvelist_length, ret);
                memcpy(ret, s->tlsext_ellipticcurvelist, s->tlsext_ellipticcurvelist_length);
                ret+=s->tlsext_ellipticcurvelist_length;
                }