Changeset 97372 in vbox for trunk/src/libs/openssl-3.0.7/crypto/cmp/cmp_msg.c
- Timestamp:
- Nov 2, 2022 7:40:16 AM (2 years ago)
- Location:
- trunk/src/libs/openssl-3.0.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.7
- Property svn:mergeinfo
-
old new 15 15 /vendor/openssl/3.0.2:150728-150729 16 16 /vendor/openssl/3.0.3:151497-151729 17 /vendor/openssl/current:147554-151496 17 /vendor/openssl/3.0.7:154371 18 /vendor/openssl/current:147554-154370
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.7/crypto/cmp/cmp_msg.c
r94404 r97372 254 254 || OSSL_CMP_CTX_reqExtensions_have_SAN(ctx) == 1) 255 255 256 static const X509_NAME *determine_subj(OSSL_CMP_CTX *ctx, 257 const X509_NAME *ref_subj, 258 int for_KUR) 256 static const X509_NAME *determine_subj(OSSL_CMP_CTX *ctx, int for_KUR, 257 const X509_NAME *ref_subj) 259 258 { 260 259 if (ctx->subjectName != NULL) 261 260 return IS_NULL_DN(ctx->subjectName) ? NULL : ctx->subjectName; 262 263 if (ref_subj != NULL && (ctx->p10CSR != NULL || for_KUR || !HAS_SAN(ctx))) 261 if (ctx->p10CSR != NULL) /* first default is from any given CSR */ 262 return X509_REQ_get_subject_name(ctx->p10CSR); 263 if (for_KUR || !HAS_SAN(ctx)) 264 264 /* 265 * For KUR, copy subject from the reference.265 * For KUR, copy subject from any reference cert as fallback. 266 266 * For IR or CR, do the same only if there is no subjectAltName. 267 267 */ … … 278 278 STACK_OF(GENERAL_NAME) *default_sans = NULL; 279 279 const X509_NAME *ref_subj = 280 ctx->p10CSR != NULL ? X509_REQ_get_subject_name(ctx->p10CSR) :281 280 refcert != NULL ? X509_get_subject_name(refcert) : NULL; 282 const X509_NAME *subject = determine_subj(ctx, ref_subj, for_KUR);281 const X509_NAME *subject = determine_subj(ctx, for_KUR, ref_subj); 283 282 const X509_NAME *issuer = ctx->issuer != NULL || refcert == NULL 284 283 ? (IS_NULL_DN(ctx->issuer) ? NULL : ctx->issuer)
Note:
See TracChangeset
for help on using the changeset viewer.