Extract compression form in EC_KEY_oct2key().
[openssl.git] / crypto / x509v3 / v3_skey.c
index c0c71c0882f0c4ecf1626db8a91cccc16ed618af..d3fe9ebfb456081082d967062b94ea6d0a141168 100644 (file)
@@ -1,4 +1,3 @@
-/* v3_skey.c */
 /*
  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
  * 1999.
@@ -60,6 +59,8 @@
 #include <stdio.h>
 #include "internal/cryptlib.h"
 #include <openssl/x509v3.h>
+#include "internal/x509_int.h"
+#include "ext_dat.h"
 
 static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
                                       X509V3_CTX *ctx, char *str);
@@ -124,9 +125,9 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
     }
 
     if (ctx->subject_req)
-        pk = ctx->subject_req->req_info->pubkey->public_key;
+        pk = ctx->subject_req->req_info.pubkey->public_key;
     else
-        pk = ctx->subject_cert->cert_info->key->public_key;
+        pk = ctx->subject_cert->cert_info.key->public_key;
 
     if (!pk) {
         X509V3err(X509V3_F_S2I_SKEY_ID, X509V3_R_NO_PUBLIC_KEY);