diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/evp_asn1.c')
-rw-r--r-- | src/lib/libcrypto/asn1/evp_asn1.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/evp_asn1.c b/src/lib/libcrypto/asn1/evp_asn1.c index 631924f88e..d4ea675f89 100644 --- a/src/lib/libcrypto/asn1/evp_asn1.c +++ b/src/lib/libcrypto/asn1/evp_asn1.c | |||
@@ -78,8 +78,7 @@ int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, | |||
78 | int ret,num; | 78 | int ret,num; |
79 | unsigned char *p; | 79 | unsigned char *p; |
80 | 80 | ||
81 | if ((a->type != V_ASN1_OCTET_STRING) || (a->value.octet_string == NULL)) | 81 | if ((a->type != V_ASN1_OCTET_STRING) || (a->value.octet_string == NULL)) { |
82 | { | ||
83 | ASN1err(ASN1_F_ASN1_TYPE_GET_OCTETSTRING,ASN1_R_DATA_IS_WRONG); | 82 | ASN1err(ASN1_F_ASN1_TYPE_GET_OCTETSTRING,ASN1_R_DATA_IS_WRONG); |
84 | return(-1); | 83 | return(-1); |
85 | } | 84 | } |
@@ -115,8 +114,7 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data, | |||
115 | 114 | ||
116 | if ((osp=ASN1_STRING_new()) == NULL) return(0); | 115 | if ((osp=ASN1_STRING_new()) == NULL) return(0); |
117 | /* Grow the 'string' */ | 116 | /* Grow the 'string' */ |
118 | if (!ASN1_STRING_set(osp,NULL,size)) | 117 | if (!ASN1_STRING_set(osp,NULL,size)) { |
119 | { | ||
120 | ASN1_STRING_free(osp); | 118 | ASN1_STRING_free(osp); |
121 | return(0); | 119 | return(0); |
122 | } | 120 | } |
@@ -145,8 +143,7 @@ int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, unsigned char *data, | |||
145 | long length; | 143 | long length; |
146 | ASN1_const_CTX c; | 144 | ASN1_const_CTX c; |
147 | 145 | ||
148 | if ((a->type != V_ASN1_SEQUENCE) || (a->value.sequence == NULL)) | 146 | if ((a->type != V_ASN1_SEQUENCE) || (a->value.sequence == NULL)) { |
149 | { | ||
150 | goto err; | 147 | goto err; |
151 | } | 148 | } |
152 | p=M_ASN1_STRING_data(a->value.sequence); | 149 | p=M_ASN1_STRING_data(a->value.sequence); |
@@ -177,8 +174,7 @@ int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, unsigned char *data, | |||
177 | 174 | ||
178 | if (data != NULL) | 175 | if (data != NULL) |
179 | memcpy(data,M_ASN1_STRING_data(os),n); | 176 | memcpy(data,M_ASN1_STRING_data(os),n); |
180 | if (0) | 177 | if (0) { |
181 | { | ||
182 | err: | 178 | err: |
183 | ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,ASN1_R_DATA_IS_WRONG); | 179 | ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,ASN1_R_DATA_IS_WRONG); |
184 | } | 180 | } |