File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10737,6 +10737,26 @@ static int CertFromX509(Cert* cert, WOLFSSL_X509* x509)
1073710737 cert -> altSigValLen = x509 -> altSigValLen ;
1073810738 cert -> altSigValCrit = x509 -> altSigValCrit ;
1073910739#endif /* WOLFSSL_DUAL_ALG_CERTS */
10740+
10741+ #if defined(WOLFSSL_ASN_TEMPLATE ) && defined(WOLFSSL_CUSTOM_OID ) && \
10742+ defined(HAVE_OID_ENCODING )
10743+
10744+ if ((x509 -> customExtCount < 0 ) ||
10745+ (x509 -> customExtCount >= NUM_CUSTOM_EXT )) {
10746+ WOLFSSL_MSG ("Bad value for customExtCount." );
10747+ return WOLFSSL_FAILURE ;
10748+ }
10749+
10750+ for (i = 0 ; i < x509 -> customExtCount ; i ++ ) {
10751+ if (wc_SetCustomExtension (cert , x509 -> custom_exts [i ].crit ,
10752+ x509 -> custom_exts [i ].oid , x509 -> custom_exts [i ].val ,
10753+ x509 -> custom_exts [i ].valSz ))
10754+ {
10755+ return WOLFSSL_FAILURE ;
10756+ }
10757+ }
10758+ #endif /* WOLFSSL_ASN_TEMPLATE && WOLFSSL_CUSTOM_OID && HAVE_OID_ENCODING */
10759+
1074010760#endif /* WOLFSSL_CERT_EXT */
1074110761
1074210762#ifdef WOLFSSL_CERT_REQ
You can’t perform that action at this time.
0 commit comments