diff options
Diffstat (limited to 'src/lib/libcrypto/pem')
-rw-r--r-- | src/lib/libcrypto/pem/Makefile | 258 | ||||
-rw-r--r-- | src/lib/libcrypto/pem/pem_lib.c | 2 |
2 files changed, 260 insertions, 0 deletions
diff --git a/src/lib/libcrypto/pem/Makefile b/src/lib/libcrypto/pem/Makefile new file mode 100644 index 0000000000..2cc7801529 --- /dev/null +++ b/src/lib/libcrypto/pem/Makefile | |||
@@ -0,0 +1,258 @@ | |||
1 | # | ||
2 | # OpenSSL/crypto/pem/Makefile | ||
3 | # | ||
4 | |||
5 | DIR= pem | ||
6 | TOP= ../.. | ||
7 | CC= cc | ||
8 | INCLUDES= -I.. -I$(TOP) -I../../include | ||
9 | CFLAG=-g | ||
10 | MAKEFILE= Makefile | ||
11 | AR= ar r | ||
12 | |||
13 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
14 | |||
15 | GENERAL=Makefile | ||
16 | TEST= | ||
17 | APPS= | ||
18 | |||
19 | LIB=$(TOP)/libcrypto.a | ||
20 | LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \ | ||
21 | pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c pvkfmt.c | ||
22 | |||
23 | LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o \ | ||
24 | pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o pvkfmt.o | ||
25 | |||
26 | SRC= $(LIBSRC) | ||
27 | |||
28 | EXHEADER= pem.h pem2.h | ||
29 | HEADER= $(EXHEADER) | ||
30 | |||
31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
32 | |||
33 | top: | ||
34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
35 | |||
36 | all: lib | ||
37 | |||
38 | lib: $(LIBOBJ) | ||
39 | $(AR) $(LIB) $(LIBOBJ) | ||
40 | $(RANLIB) $(LIB) || echo Never mind. | ||
41 | @touch lib | ||
42 | |||
43 | files: | ||
44 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | ||
45 | |||
46 | links: $(EXHEADER) | ||
47 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
48 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
49 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
50 | |||
51 | install: | ||
52 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
53 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | ||
54 | do \ | ||
55 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
56 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
57 | done; | ||
58 | |||
59 | tags: | ||
60 | ctags $(SRC) | ||
61 | |||
62 | tests: | ||
63 | |||
64 | lint: | ||
65 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
66 | |||
67 | depend: | ||
68 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
69 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) | ||
70 | |||
71 | dclean: | ||
72 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
73 | mv -f Makefile.new $(MAKEFILE) | ||
74 | |||
75 | clean: | ||
76 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
77 | |||
78 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
79 | |||
80 | pem_all.o: ../../e_os.h ../../include/openssl/asn1.h | ||
81 | pem_all.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
82 | pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | ||
83 | pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
84 | pem_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
85 | pem_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
86 | pem_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
87 | pem_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
88 | pem_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
89 | pem_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h | ||
90 | pem_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | ||
91 | pem_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
92 | pem_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
93 | pem_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
94 | pem_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_all.c | ||
95 | pem_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
96 | pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
97 | pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
98 | pem_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
99 | pem_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
100 | pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
101 | pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
102 | pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
103 | pem_err.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
104 | pem_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
105 | pem_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
106 | pem_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
107 | pem_err.o: ../../include/openssl/x509_vfy.h pem_err.c | ||
108 | pem_info.o: ../../e_os.h ../../include/openssl/asn1.h | ||
109 | pem_info.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
110 | pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h | ||
111 | pem_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
112 | pem_info.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
113 | pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
114 | pem_info.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
115 | pem_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
116 | pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
117 | pem_info.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
118 | pem_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
119 | pem_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
120 | pem_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
121 | pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
122 | pem_info.o: ../cryptlib.h pem_info.c | ||
123 | pem_lib.o: ../../e_os.h ../../include/openssl/asn1.h | ||
124 | pem_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
125 | pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
126 | pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h | ||
127 | pem_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
128 | pem_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h | ||
129 | pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
130 | pem_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
131 | pem_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
132 | pem_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
133 | pem_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
134 | pem_lib.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
135 | pem_lib.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h | ||
136 | pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
137 | pem_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
138 | pem_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
139 | pem_lib.o: ../../include/openssl/x509_vfy.h ../asn1/asn1_locl.h ../cryptlib.h | ||
140 | pem_lib.o: pem_lib.c | ||
141 | pem_oth.o: ../../e_os.h ../../include/openssl/asn1.h | ||
142 | pem_oth.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
143 | pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
144 | pem_oth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
145 | pem_oth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
146 | pem_oth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
147 | pem_oth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
148 | pem_oth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
149 | pem_oth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h | ||
150 | pem_oth.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | ||
151 | pem_oth.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h | ||
152 | pem_oth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
153 | pem_oth.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
154 | pem_oth.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_oth.c | ||
155 | pem_pk8.o: ../../e_os.h ../../include/openssl/asn1.h | ||
156 | pem_pk8.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
157 | pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
158 | pem_pk8.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
159 | pem_pk8.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
160 | pem_pk8.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
161 | pem_pk8.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
162 | pem_pk8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
163 | pem_pk8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h | ||
164 | pem_pk8.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h | ||
165 | pem_pk8.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
166 | pem_pk8.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
167 | pem_pk8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
168 | pem_pk8.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
169 | pem_pk8.o: ../cryptlib.h pem_pk8.c | ||
170 | pem_pkey.o: ../../e_os.h ../../include/openssl/asn1.h | ||
171 | pem_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
172 | pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
173 | pem_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
174 | pem_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h | ||
175 | pem_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
176 | pem_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
177 | pem_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
178 | pem_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
179 | pem_pkey.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
180 | pem_pkey.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
181 | pem_pkey.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h | ||
182 | pem_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
183 | pem_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
184 | pem_pkey.o: ../../include/openssl/x509_vfy.h ../asn1/asn1_locl.h ../cryptlib.h | ||
185 | pem_pkey.o: pem_pkey.c | ||
186 | pem_seal.o: ../../e_os.h ../../include/openssl/asn1.h | ||
187 | pem_seal.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
188 | pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
189 | pem_seal.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
190 | pem_seal.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
191 | pem_seal.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
192 | pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
193 | pem_seal.o: ../../include/openssl/opensslconf.h | ||
194 | pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
195 | pem_seal.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
196 | pem_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
197 | pem_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
198 | pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
199 | pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
200 | pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c | ||
201 | pem_sign.o: ../../e_os.h ../../include/openssl/asn1.h | ||
202 | pem_sign.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
203 | pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
204 | pem_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
205 | pem_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
206 | pem_sign.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
207 | pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
208 | pem_sign.o: ../../include/openssl/opensslconf.h | ||
209 | pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
210 | pem_sign.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
211 | pem_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
212 | pem_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
213 | pem_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
214 | pem_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
215 | pem_sign.o: ../cryptlib.h pem_sign.c | ||
216 | pem_x509.o: ../../e_os.h ../../include/openssl/asn1.h | ||
217 | pem_x509.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
218 | pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
219 | pem_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
220 | pem_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
221 | pem_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
222 | pem_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
223 | pem_x509.o: ../../include/openssl/opensslconf.h | ||
224 | pem_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
225 | pem_x509.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
226 | pem_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
227 | pem_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
228 | pem_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
229 | pem_x509.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_x509.c | ||
230 | pem_xaux.o: ../../e_os.h ../../include/openssl/asn1.h | ||
231 | pem_xaux.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
232 | pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
233 | pem_xaux.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
234 | pem_xaux.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
235 | pem_xaux.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
236 | pem_xaux.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
237 | pem_xaux.o: ../../include/openssl/opensslconf.h | ||
238 | pem_xaux.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
239 | pem_xaux.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
240 | pem_xaux.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
241 | pem_xaux.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
242 | pem_xaux.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
243 | pem_xaux.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_xaux.c | ||
244 | pvkfmt.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
245 | pvkfmt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
246 | pvkfmt.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h | ||
247 | pvkfmt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
248 | pvkfmt.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
249 | pvkfmt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
250 | pvkfmt.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
251 | pvkfmt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
252 | pvkfmt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
253 | pvkfmt.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | ||
254 | pvkfmt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
255 | pvkfmt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
256 | pvkfmt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
257 | pvkfmt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
258 | pvkfmt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pvkfmt.c | ||
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c index cfc89a9921..42e4861bc1 100644 --- a/src/lib/libcrypto/pem/pem_lib.c +++ b/src/lib/libcrypto/pem/pem_lib.c | |||
@@ -482,6 +482,7 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, | |||
482 | 482 | ||
483 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) | 483 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) |
484 | { | 484 | { |
485 | int o; | ||
485 | const EVP_CIPHER *enc=NULL; | 486 | const EVP_CIPHER *enc=NULL; |
486 | char *p,c; | 487 | char *p,c; |
487 | char **header_pp = &header; | 488 | char **header_pp = &header; |
@@ -521,6 +522,7 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) | |||
521 | header++; | 522 | header++; |
522 | } | 523 | } |
523 | *header='\0'; | 524 | *header='\0'; |
525 | o=OBJ_sn2nid(p); | ||
524 | cipher->cipher=enc=EVP_get_cipherbyname(p); | 526 | cipher->cipher=enc=EVP_get_cipherbyname(p); |
525 | *header=c; | 527 | *header=c; |
526 | header++; | 528 | header++; |