Added guard code to avoid issue when decoding PEM but not keeping data.
[BearSSL] / inc / bearssl_x509.h
index 2463c79..10e3510 100644 (file)
 #include "bearssl_hash.h"
 #include "bearssl_rsa.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /** \file bearssl_x509.h
  *
  * # X.509 Certificate Chain Processing
@@ -356,7 +360,7 @@ typedef struct {
  *   - `end_chain()` is called when the last certificate in the chain
  *     was processed.
  *   - `get_pkey()` is called after chain processing, if the chain
- *     validation was succesfull.
+ *     validation was successful.
  *
  * A context structure may be reused; the `start_chain()` method shall
  * ensure (re)initialisation.
@@ -1245,4 +1249,8 @@ br_skey_decoder_get_ec(const br_skey_decoder_context *ctx)
        }
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif