Commit b953d9d4 authored by Denis Filatov's avatar Denis Filatov
Browse files

fix multiple id region in cert geterator

parent 982f2adc
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,15 @@ static asn_dec_rval_t IssuerIdentifier_xer_decoder(const asn_codec_ctx_t *opt_co
	return CHOICE_decode_xer(opt_codec_ctx, td, struct_ptr, opt_mname, buf_ptr, size);
	return CHOICE_decode_xer(opt_codec_ctx, td, struct_ptr, opt_mname, buf_ptr, size);
}
}


static asn_dec_rval_t CountryOnly_xer_decoder(const asn_codec_ctx_t *opt_codec_ctx,
	const asn_TYPE_descriptor_t *td, void **struct_ptr,
	const char *opt_mname, const void *buf_ptr, size_t size)
{
	// for the future to support letter codes
	return NativeInteger_decode_xer(opt_codec_ctx, td, struct_ptr, opt_mname, buf_ptr, size);
}


typedef struct overrun_encoder_key {
typedef struct overrun_encoder_key {
	void *buffer;
	void *buffer;
	size_t buffer_size;
	size_t buffer_size;
@@ -272,9 +281,13 @@ int main(int argc, char ** argv)
	asn_TYPE_operation_t signatureOps = *asn_DEF_Signature.op;
	asn_TYPE_operation_t signatureOps = *asn_DEF_Signature.op;
	asn_DEF_Signature.op = &signatureOps;
	asn_DEF_Signature.op = &signatureOps;


	asn_TYPE_operation_t countryOnlyOps = *asn_DEF_CountryOnly.op;
	asn_DEF_CountryOnly.op = &countryOnlyOps;

	issuerOps.xer_decoder = IssuerIdentifier_xer_decoder;
	issuerOps.xer_decoder = IssuerIdentifier_xer_decoder;
	tbsOps.oer_encoder = ToBeSignedCertificate_oer_encoder;
	tbsOps.oer_encoder = ToBeSignedCertificate_oer_encoder;
	signatureOps.oer_encoder = Signature_oer_encoder;
	signatureOps.oer_encoder = Signature_oer_encoder;
	countryOnlyOps.xer_decoder = CountryOnly_xer_decoder;


	PublicVerificationKey_PR hashType = PublicVerificationKey_PR_NOTHING;
	PublicVerificationKey_PR hashType = PublicVerificationKey_PR_NOTHING;


+24 −20
Original line number Original line Diff line number Diff line
@@ -472,9 +472,15 @@
  </region>
  </region>
 </xsl:template>
 </xsl:template>


 <xsl:template mode="region" match="id">
 <xsl:template mode="region" match="restriction[@type='region' and id]">
   <region>
   <region>
    <identifiedRegion>
    <identifiedRegion>
     <xsl:apply-templates mode="region" select="id"/>
    </identifiedRegion>
   </region>
 </xsl:template>

 <xsl:template mode="region" match="id">
   <xsl:choose>
   <xsl:choose>
    <xsl:when test="@local != '0'">
    <xsl:when test="@local != '0'">
      <countryAndRegions>
      <countryAndRegions>
@@ -492,8 +498,6 @@
      </xsl:call-template>
      </xsl:call-template>
    </xsl:otherwise>
    </xsl:otherwise>
   </xsl:choose>
   </xsl:choose>
    </identifiedRegion>
  </region>
 </xsl:template>
 </xsl:template>


 <xsl:template name="geo-value">
 <xsl:template name="geo-value">