Various clarifications to extension docs: change the name of literal
[oweals/openssl.git] / crypto / x509v3 / v3_alt.c
index e1b768fdd2a45b331f23f9f51e7b8452c78b3295..f0f64d76a32391b44c96e3d211a212ce5dcea463 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "conf.h"
-#include "x509v3.h"
+#include <openssl/conf.h>
+#include <openssl/x509v3.h>
 
-#ifndef NOPROTO
 static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
 static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
 static int copy_email(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens);
 static int copy_issuer(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens);
-#else
-static STACK *v2i_issuer_alt();
-static STACK *v2i_subject_alt();
-static int copy_email();
-static int copy_issuer();
-#endif
-
 X509V3_EXT_METHOD v3_alt[] = {
 { NID_subject_alt_name, 0,
 (X509V3_EXT_NEW)GENERAL_NAMES_new,
@@ -104,6 +96,7 @@ STACK *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method,
                gen = sk_GENERAL_NAME_value(gens, i);
                ret = i2v_GENERAL_NAME(method, gen, ret);
        }
+       if(!ret) return sk_new_null();
        return ret;
 }