Import OpenSSL 1.1.1i
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -103,9 +103,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
|
||||
return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
|
||||
|
||||
case ASN1_ITYPE_MSTRING:
|
||||
/*
|
||||
* It never makes sense for multi-strings to have implicit tagging, so
|
||||
* if tag != -1, then this looks like an error in the template.
|
||||
*/
|
||||
if (tag != -1) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
|
||||
return -1;
|
||||
}
|
||||
return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
|
||||
|
||||
case ASN1_ITYPE_CHOICE:
|
||||
/*
|
||||
* It never makes sense for CHOICE types to have implicit tagging, so
|
||||
* if tag != -1, then this looks like an error in the template.
|
||||
*/
|
||||
if (tag != -1) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
|
||||
return -1;
|
||||
}
|
||||
if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
|
||||
return 0;
|
||||
i = asn1_get_choice_selector(pval, it);
|
||||
|
||||
Reference in New Issue
Block a user