give more meaningful error if presented with wrong certificate type by server
[openssl.git] / crypto / asn1 / tasn_enc.c
index 685401e163e982a777a053aed1e3ee37fbe4bbfa..936ad1f767c686ce612378b342ac9cff00f008aa 100644 (file)
@@ -1,5 +1,5 @@
 /* tasn_enc.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2000.
  */
 /* ====================================================================
@@ -494,7 +494,7 @@ static int asn1_set_seq_out(STACK_OF(ASN1_VALUE) *sk, unsigned char **out,
                {
                for (i = 0, tder = derlst; i < sk_ASN1_VALUE_num(sk);
                                                        i++, tder++)
-                       sk_ASN1_VALUE_set(sk, i, tder->field);
+                       (void)sk_ASN1_VALUE_set(sk, i, tder->field);
                }
        OPENSSL_free(derlst);
        OPENSSL_free(tmpdat);
@@ -569,7 +569,8 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,
        ASN1_STRING *strtmp;
        ASN1_OBJECT *otmp;
        int utype;
-       unsigned char *cont, c;
+       const unsigned char *cont;
+       unsigned char c;
        int len;
        const ASN1_PRIMITIVE_FUNCS *pf;
        pf = it->funcs;
@@ -597,7 +598,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,
                typ = (ASN1_TYPE *)*pval;
                utype = typ->type;
                *putype = utype;
-               pval = (ASN1_VALUE **)&typ->value.ptr;
+               pval = &typ->value.asn1_value;
                }
        else utype = *putype;