Fix link for ASN1_generate_nconf
[openssl.git] / crypto / asn1 / asn1.h
index f0756b10cd16e5d769bd59581453fab41aa0b5ee..d2b8329098af2e2e127f21e65930fc99dee0b0f3 100644 (file)
@@ -282,42 +282,6 @@ typedef struct ASN1_TLC_st ASN1_TLC;
 /* This is just an opaque pointer */
 typedef struct ASN1_VALUE_st ASN1_VALUE;
 
-/* ASN1 public key method structure */
-
-#define ASN1_PKEY_ALIAS                0x1
-
-struct evp_pkey_asn1_method_st
-       {
-       int pkey_id;
-       int pkey_base_id;
-       unsigned long pkey_flags;
-
-       int (*pub_decode)(EVP_PKEY *pk, X509_PUBKEY *pub);
-       int (*pub_encode)(X509_PUBKEY *pub, const EVP_PKEY *pk);
-       int (*pub_cmp)(const EVP_PKEY *a, const EVP_PKEY *b);
-       int (*pub_print)(BIO *out, const EVP_PKEY *pkey, int indent,
-                                                       ASN1_PCTX *pctx);
-
-       int (*priv_decode)(EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf);
-       int (*priv_encode)(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk);
-       int (*priv_print)(BIO *out, EVP_PKEY *pkey, int indent,
-                                                       ASN1_PCTX *pctx);
-
-       int (*pkey_size)(const EVP_PKEY *pk);
-       int (*pkey_bits)(const EVP_PKEY *pk);
-
-       int (*param_decode)(const EVP_PKEY *pk, X509_PUBKEY *pub);
-       int (*param_encode)(X509_PUBKEY *pub, const EVP_PKEY *pk);
-       int (*param_missing)(const EVP_PKEY *pk);
-       int (*param_copy)(EVP_PKEY *to, const EVP_PKEY *from);
-       int (*param_cmp)(const EVP_PKEY *a, const EVP_PKEY *b);
-       int (*param_print)(BIO *out, const EVP_PKEY *pkey, int indent,
-                                                       ASN1_PCTX *pctx);
-
-       void (*pkey_free)(EVP_PKEY *pkey);
-       void (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2);
-       } /* EVP_PKEY_ASN1_METHOD */;
-
 /* Declare ASN1 functions: the implement macro in in asn1t.h */
 
 #define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type)
@@ -801,6 +765,7 @@ int                 ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
   /* Since this is used to store all sorts of things, via macros, for now, make
      its data void * */
 int            ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
+void           ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
 int ASN1_STRING_length(const ASN1_STRING *x);
 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
 int ASN1_STRING_type(ASN1_STRING *x);
@@ -981,6 +946,8 @@ int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
+int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
+                               unsigned char *buf, int off);
 int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent);
 int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump);
 #endif
@@ -1184,7 +1151,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_LONG_C2I                                         166
 #define ASN1_F_OID_MODULE_INIT                          174
 #define ASN1_F_PARSE_TAGGING                            182
-#define ASN1_F_PKCS5_PBE2_SET                           167
+#define ASN1_F_PKCS5_PBE2_SET_IV                        167
 #define ASN1_F_PKCS5_PBE_SET                            202
 #define ASN1_F_X509_CINF_NEW                            168
 #define ASN1_F_X509_CRL_ADD0_REVOKED                    169
@@ -1210,6 +1177,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_DECODE_ERROR                             110
 #define ASN1_R_DECODING_ERROR                           111
 #define ASN1_R_DEPTH_EXCEEDED                           174
+#define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED        198
 #define ASN1_R_ENCODE_ERROR                             112
 #define ASN1_R_ERROR_GETTING_TIME                       173
 #define ASN1_R_ERROR_LOADING_SECTION                    172
@@ -1261,6 +1229,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_NON_HEX_CHARACTERS                       141
 #define ASN1_R_NOT_ASCII_FORMAT                                 190
 #define ASN1_R_NOT_ENOUGH_DATA                          142
+#define ASN1_R_NO_DEFAULT_DIGEST                        201
 #define ASN1_R_NO_MATCHING_CHOICE_TYPE                  143
 #define ASN1_R_NULL_IS_WRONG_LENGTH                     144
 #define ASN1_R_OBJECT_NOT_ASCII_FORMAT                  191
@@ -1285,6 +1254,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM                 161
 #define ASN1_R_UNKNOWN_OBJECT_TYPE                      162
 #define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE                  163
+#define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM              199
 #define ASN1_R_UNKNOWN_TAG                              194
 #define ASN1_R_UNKOWN_FORMAT                            195
 #define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE          164
@@ -1292,6 +1262,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM                 166
 #define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE              167
 #define ASN1_R_UNSUPPORTED_TYPE                                 196
+#define ASN1_R_WRONG_PUBLIC_KEY_TYPE                    200
 #define ASN1_R_WRONG_TAG                                168
 #define ASN1_R_WRONG_TYPE                               169