@@ -258,6 +258,21 @@ OPENSSL_EXPORT X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
258
258
// but they will be rejected when verifying.
259
259
OPENSSL_EXPORT const X509_ALGOR * X509_get0_tbs_sigalg (const X509 * x509 );
260
260
261
+ // X509_SIG_INFO_* are flags for |X509_get_signature_info|.
262
+ // X509_SIG_INFO_VALID means that the signature info is valid.
263
+ #define X509_SIG_INFO_VALID 0x1
264
+ // X509_SIG_INFO_TLS means that the signature is suitable for TLS use.
265
+ #define X509_SIG_INFO_TLS 0x2
266
+
267
+ // X509_get_signature_info retrieves information about the signature of |x509|.
268
+ // The NID of the signing digest is written to |*digest_nid|, the public key
269
+ // algorithm to |*pubkey_nid|, the effective security bits to |*sec_bits|, and
270
+ // flag details to |*flags|. Parameters other than |*x509| can be set to NULL if
271
+ // the information is not required.
272
+ OPENSSL_EXPORT int X509_get_signature_info (X509 * x509 , int * digest_nid ,
273
+ int * pubkey_nid , int * sec_bits ,
274
+ uint32_t * flags );
275
+
261
276
// X509_get0_signature sets |*out_sig| and |*out_alg| to the signature and
262
277
// signature algorithm of |x509|, respectively. Either output pointer may be
263
278
// NULL to ignore the value.
@@ -1838,7 +1853,8 @@ OPENSSL_EXPORT int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase);
1838
1853
// This function outputs a legacy format that does not correctly handle string
1839
1854
// encodings and other cases. Prefer |X509_NAME_print_ex| if printing a name for
1840
1855
// debugging purposes.
1841
- OPENSSL_EXPORT char * X509_NAME_oneline (const X509_NAME * name , char * buf , int size );
1856
+ OPENSSL_EXPORT char * X509_NAME_oneline (const X509_NAME * name , char * buf ,
1857
+ int size );
1842
1858
1843
1859
// X509_NAME_print_ex_fp behaves like |X509_NAME_print_ex| but writes to |fp|.
1844
1860
OPENSSL_EXPORT int X509_NAME_print_ex_fp (FILE * fp , const X509_NAME * nm ,
@@ -3029,8 +3045,7 @@ OPENSSL_EXPORT int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx,
3029
3045
// may be |X509_LU_X509| or |X509_LU_CRL|, and the subject name from the store
3030
3046
// in |vs|. If found and |ret| is not NULL, it increments the reference count
3031
3047
// and stores the object in |ret|.
3032
- OPENSSL_EXPORT int X509_STORE_CTX_get_by_subject (X509_STORE_CTX * vs ,
3033
- int type ,
3048
+ OPENSSL_EXPORT int X509_STORE_CTX_get_by_subject (X509_STORE_CTX * vs , int type ,
3034
3049
X509_NAME * name ,
3035
3050
X509_OBJECT * ret );
3036
3051
@@ -3206,5 +3221,6 @@ BSSL_NAMESPACE_END
3206
3221
#define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 142
3207
3222
#define X509_R_NO_CRL_FOUND 143
3208
3223
#define X509_R_INVALID_POLICY_EXTENSION 144
3224
+ #define X509_R_UNKNOWN_SIGID_ALGS 145
3209
3225
3210
3226
#endif // OPENSSL_HEADER_X509_H
0 commit comments