Add missing functions to allow access to newer X509_STORE_CTX status
[openssl.git] / demos / spkigen.c
index 01fe6254f22622cee3a24d433b17cf6c6698da22..2cd5dfea970dd65223d10ce75c707940ac3f1ff5 100644 (file)
@@ -6,12 +6,12 @@
  */
 #include <stdio.h>
 #include <stdlib.h>
  */
 #include <stdio.h>
 #include <stdlib.h>
-#include "err.h"
-#include "asn1.h"
-#include "objects.h"
-#include "evp.h"
-#include "x509.h"
-#include "pem.h"
+#include <openssl/err.h>
+#include <openssl/asn1.h>
+#include <openssl/objects.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
 
 /* The following two don't exist in SSLeay but they are in here as
  * examples */
 
 /* The following two don't exist in SSLeay but they are in here as
  * examples */
@@ -65,7 +65,8 @@ char *argv[];
 
        fprintf(stderr,"please enter challenge string:");
        fflush(stderr);
 
        fprintf(stderr,"please enter challenge string:");
        fflush(stderr);
-       fgets(buf,120,stdin);
+       buf[0]='\0';
+       fgets(buf,sizeof buf,stdin);
        i=strlen(buf);
        if (i > 0) buf[--i]='\0';
        if (!ASN1_STRING_set((ASN1_STRING *)spki->spkac->challenge,
        i=strlen(buf);
        if (i > 0) buf[--i]='\0';
        if (!ASN1_STRING_set((ASN1_STRING *)spki->spkac->challenge,