diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_set.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_set.c | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c index 5d0a3a0c0e..5a6f7b414f 100644 --- a/src/lib/libcrypto/x509/x509_set.c +++ b/src/lib/libcrypto/x509/x509_set.c | |||
@@ -58,14 +58,12 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "asn1.h" | 61 | #include <openssl/asn1.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | #include "evp.h" | 63 | #include <openssl/evp.h> |
64 | #include "x509.h" | 64 | #include <openssl/x509.h> |
65 | 65 | ||
66 | int X509_set_version(x,version) | 66 | int X509_set_version(X509 *x, long version) |
67 | X509 *x; | ||
68 | long version; | ||
69 | { | 67 | { |
70 | if (x == NULL) return(0); | 68 | if (x == NULL) return(0); |
71 | if (x->cert_info->version == NULL) | 69 | if (x->cert_info->version == NULL) |
@@ -76,9 +74,7 @@ long version; | |||
76 | return(ASN1_INTEGER_set(x->cert_info->version,version)); | 74 | return(ASN1_INTEGER_set(x->cert_info->version,version)); |
77 | } | 75 | } |
78 | 76 | ||
79 | int X509_set_serialNumber(x,serial) | 77 | int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial) |
80 | X509 *x; | ||
81 | ASN1_INTEGER *serial; | ||
82 | { | 78 | { |
83 | ASN1_INTEGER *in; | 79 | ASN1_INTEGER *in; |
84 | 80 | ||
@@ -96,25 +92,19 @@ ASN1_INTEGER *serial; | |||
96 | return(in != NULL); | 92 | return(in != NULL); |
97 | } | 93 | } |
98 | 94 | ||
99 | int X509_set_issuer_name(x,name) | 95 | int X509_set_issuer_name(X509 *x, X509_NAME *name) |
100 | X509 *x; | ||
101 | X509_NAME *name; | ||
102 | { | 96 | { |
103 | if ((x == NULL) || (x->cert_info == NULL)) return(0); | 97 | if ((x == NULL) || (x->cert_info == NULL)) return(0); |
104 | return(X509_NAME_set(&x->cert_info->issuer,name)); | 98 | return(X509_NAME_set(&x->cert_info->issuer,name)); |
105 | } | 99 | } |
106 | 100 | ||
107 | int X509_set_subject_name(x,name) | 101 | int X509_set_subject_name(X509 *x, X509_NAME *name) |
108 | X509 *x; | ||
109 | X509_NAME *name; | ||
110 | { | 102 | { |
111 | if ((x == NULL) || (x->cert_info == NULL)) return(0); | 103 | if ((x == NULL) || (x->cert_info == NULL)) return(0); |
112 | return(X509_NAME_set(&x->cert_info->subject,name)); | 104 | return(X509_NAME_set(&x->cert_info->subject,name)); |
113 | } | 105 | } |
114 | 106 | ||
115 | int X509_set_notBefore(x,tm) | 107 | int X509_set_notBefore(X509 *x, ASN1_UTCTIME *tm) |
116 | X509 *x; | ||
117 | ASN1_UTCTIME *tm; | ||
118 | { | 108 | { |
119 | ASN1_UTCTIME *in; | 109 | ASN1_UTCTIME *in; |
120 | 110 | ||
@@ -132,9 +122,7 @@ ASN1_UTCTIME *tm; | |||
132 | return(in != NULL); | 122 | return(in != NULL); |
133 | } | 123 | } |
134 | 124 | ||
135 | int X509_set_notAfter(x,tm) | 125 | int X509_set_notAfter(X509 *x, ASN1_UTCTIME *tm) |
136 | X509 *x; | ||
137 | ASN1_UTCTIME *tm; | ||
138 | { | 126 | { |
139 | ASN1_UTCTIME *in; | 127 | ASN1_UTCTIME *in; |
140 | 128 | ||
@@ -152,9 +140,7 @@ ASN1_UTCTIME *tm; | |||
152 | return(in != NULL); | 140 | return(in != NULL); |
153 | } | 141 | } |
154 | 142 | ||
155 | int X509_set_pubkey(x,pkey) | 143 | int X509_set_pubkey(X509 *x, EVP_PKEY *pkey) |
156 | X509 *x; | ||
157 | EVP_PKEY *pkey; | ||
158 | { | 144 | { |
159 | if ((x == NULL) || (x->cert_info == NULL)) return(0); | 145 | if ((x == NULL) || (x->cert_info == NULL)) return(0); |
160 | return(X509_PUBKEY_set(&(x->cert_info->key),pkey)); | 146 | return(X509_PUBKEY_set(&(x->cert_info->key),pkey)); |