]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - kerberos5/lib/libasn1/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / kerberos5 / lib / libasn1 / Makefile
1 # $FreeBSD$
2
3 LIB=    asn1
4 LDFLAGS=        -Wl,--no-undefined
5 INCS=   asn1_err.h heim_asn1.h
6 LDADD=  -lcom_err -lroken
7 DPADD=  ${LIBCOM_ERR} ${LIBROKEN}
8
9 SRCS=   asn1_err.c \
10         asn1_err.h \
11         der_copy.c \
12         der_cmp.c \
13         der_free.c \
14         der_format.c \
15         der_get.c \
16         der_length.c \
17         der_put.c \
18         extra.c \
19         timegm.c \
20         ${GEN:S/.x$/.c/}
21
22 CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I.
23
24 GEN_RFC2459 = \
25         asn1_Version.x \
26         asn1_id_pkcs_1.x \
27         asn1_id_pkcs1_rsaEncryption.x \
28         asn1_id_pkcs1_md2WithRSAEncryption.x \
29         asn1_id_pkcs1_md5WithRSAEncryption.x \
30         asn1_id_pkcs1_sha1WithRSAEncryption.x \
31         asn1_id_pkcs1_sha256WithRSAEncryption.x \
32         asn1_id_pkcs1_sha384WithRSAEncryption.x \
33         asn1_id_pkcs1_sha512WithRSAEncryption.x \
34         asn1_id_heim_rsa_pkcs1_x509.x \
35         asn1_id_pkcs_2.x \
36         asn1_id_pkcs2_md2.x \
37         asn1_id_pkcs2_md4.x \
38         asn1_id_pkcs2_md5.x \
39         asn1_id_rsa_digestAlgorithm.x \
40         asn1_id_rsa_digest_md2.x \
41         asn1_id_rsa_digest_md4.x \
42         asn1_id_rsa_digest_md5.x \
43         asn1_id_pkcs_3.x \
44         asn1_id_pkcs3_rc2_cbc.x \
45         asn1_id_pkcs3_rc4.x \
46         asn1_id_pkcs3_des_ede3_cbc.x \
47         asn1_id_rsadsi_encalg.x \
48         asn1_id_rsadsi_rc2_cbc.x \
49         asn1_id_rsadsi_des_ede3_cbc.x \
50         asn1_id_secsig_sha_1.x \
51         asn1_id_nistAlgorithm.x \
52         asn1_id_nist_aes_algs.x \
53         asn1_id_aes_128_cbc.x \
54         asn1_id_aes_192_cbc.x \
55         asn1_id_aes_256_cbc.x \
56         asn1_id_nist_sha_algs.x \
57         asn1_id_sha256.x \
58         asn1_id_sha224.x \
59         asn1_id_sha384.x \
60         asn1_id_sha512.x \
61         asn1_id_dhpublicnumber.x \
62         asn1_id_x9_57.x \
63         asn1_id_dsa.x \
64         asn1_id_dsa_with_sha1.x \
65         asn1_id_x520_at.x \
66         asn1_id_at_commonName.x \
67         asn1_id_at_surname.x \
68         asn1_id_at_serialNumber.x \
69         asn1_id_at_countryName.x \
70         asn1_id_at_localityName.x \
71         asn1_id_at_streetAddress.x \
72         asn1_id_at_stateOrProvinceName.x \
73         asn1_id_at_organizationName.x \
74         asn1_id_at_organizationalUnitName.x \
75         asn1_id_at_name.x \
76         asn1_id_at_givenName.x \
77         asn1_id_at_initials.x \
78         asn1_id_at_generationQualifier.x \
79         asn1_id_at_pseudonym.x \
80         asn1_id_Userid.x \
81         asn1_id_domainComponent.x \
82         asn1_id_x509_ce.x \
83         asn1_id_uspkicommon_card_id.x \
84         asn1_id_uspkicommon_piv_interim.x \
85         asn1_id_netscape.x \
86         asn1_id_netscape_cert_comment.x \
87         asn1_id_ms_cert_enroll_domaincontroller.x \
88         asn1_id_ms_client_authentication.x \
89         asn1_AlgorithmIdentifier.x \
90         asn1_AttributeType.x \
91         asn1_AttributeValue.x \
92         asn1_TeletexStringx.x \
93         asn1_DirectoryString.x \
94         asn1_Attribute.x \
95         asn1_AttributeTypeAndValue.x \
96         asn1_AuthorityInfoAccessSyntax.x \
97         asn1_AccessDescription.x \
98         asn1_RelativeDistinguishedName.x \
99         asn1_RDNSequence.x \
100         asn1_Name.x \
101         asn1_CertificateSerialNumber.x \
102         asn1_Time.x \
103         asn1_Validity.x \
104         asn1_UniqueIdentifier.x \
105         asn1_SubjectPublicKeyInfo.x \
106         asn1_Extension.x \
107         asn1_Extensions.x \
108         asn1_TBSCertificate.x \
109         asn1_Certificate.x \
110         asn1_Certificates.x \
111         asn1_ValidationParms.x \
112         asn1_DomainParameters.x \
113         asn1_DHPublicKey.x \
114         asn1_OtherName.x \
115         asn1_GeneralName.x \
116         asn1_GeneralNames.x \
117         asn1_id_x509_ce_keyUsage.x \
118         asn1_KeyUsage.x \
119         asn1_id_x509_ce_authorityKeyIdentifier.x \
120         asn1_KeyIdentifier.x \
121         asn1_AuthorityKeyIdentifier.x \
122         asn1_id_x509_ce_subjectKeyIdentifier.x \
123         asn1_SubjectKeyIdentifier.x \
124         asn1_id_x509_ce_basicConstraints.x \
125         asn1_BasicConstraints.x \
126         asn1_id_x509_ce_nameConstraints.x \
127         asn1_BaseDistance.x \
128         asn1_GeneralSubtree.x \
129         asn1_GeneralSubtrees.x \
130         asn1_NameConstraints.x \
131         asn1_id_x509_ce_privateKeyUsagePeriod.x \
132         asn1_id_x509_ce_certificatePolicies.x \
133         asn1_id_x509_ce_policyMappings.x \
134         asn1_id_x509_ce_subjectAltName.x \
135         asn1_id_x509_ce_issuerAltName.x \
136         asn1_id_x509_ce_subjectDirectoryAttributes.x \
137         asn1_id_x509_ce_policyConstraints.x \
138         asn1_id_x509_ce_extKeyUsage.x \
139         asn1_ExtKeyUsage.x \
140         asn1_id_x509_ce_cRLDistributionPoints.x \
141         asn1_id_x509_ce_deltaCRLIndicator.x \
142         asn1_id_x509_ce_issuingDistributionPoint.x \
143         asn1_id_x509_ce_holdInstructionCode.x \
144         asn1_id_x509_ce_invalidityDate.x \
145         asn1_id_x509_ce_certificateIssuer.x \
146         asn1_id_x509_ce_inhibitAnyPolicy.x \
147         asn1_DistributionPointReasonFlags.x \
148         asn1_DistributionPointName.x \
149         asn1_DistributionPoint.x \
150         asn1_CRLDistributionPoints.x \
151         asn1_DSASigValue.x \
152         asn1_DSAPublicKey.x \
153         asn1_DSAParams.x \
154         asn1_RSAPublicKey.x \
155         asn1_RSAPrivateKey.x \
156         asn1_DigestInfo.x \
157         asn1_TBSCRLCertList.x \
158         asn1_CRLCertificateList.x \
159         asn1_id_x509_ce_cRLNumber.x \
160         asn1_id_x509_ce_freshestCRL.x \
161         asn1_id_x509_ce_cRLReason.x \
162         asn1_CRLReason.x \
163         asn1_PKIXXmppAddr.x \
164         asn1_id_pkix.x \
165         asn1_id_pkix_on.x \
166         asn1_id_pkix_on_dnsSRV.x \
167         asn1_id_pkix_on_xmppAddr.x \
168         asn1_id_pkix_kp.x \
169         asn1_id_pkix_kp_serverAuth.x \
170         asn1_id_pkix_kp_clientAuth.x \
171         asn1_id_pkix_kp_emailProtection.x \
172         asn1_id_pkix_kp_timeStamping.x \
173         asn1_id_pkix_kp_OCSPSigning.x \
174         asn1_id_pkix_pe.x \
175         asn1_id_pkix_pe_authorityInfoAccess.x \
176         asn1_id_pkix_pe_proxyCertInfo.x \
177         asn1_id_pkix_ppl.x \
178         asn1_id_pkix_ppl_anyLanguage.x \
179         asn1_id_pkix_ppl_inheritAll.x \
180         asn1_id_pkix_ppl_independent.x \
181         asn1_ProxyPolicy.x \
182         asn1_ProxyCertInfo.x 
183
184 GEN_CMS = \
185         asn1_CMSAttributes.x \
186         asn1_CMSCBCParameter.x \
187         asn1_CMSEncryptedData.x \
188         asn1_CMSIdentifier.x \
189         asn1_CMSRC2CBCParameter.x \
190         asn1_CMSVersion.x \
191         asn1_CertificateList.x \
192         asn1_CertificateRevocationLists.x \
193         asn1_CertificateSet.x \
194         asn1_ContentEncryptionAlgorithmIdentifier.x \
195         asn1_ContentInfo.x \
196         asn1_ContentType.x \
197         asn1_DigestAlgorithmIdentifier.x \
198         asn1_DigestAlgorithmIdentifiers.x \
199         asn1_EncapsulatedContentInfo.x \
200         asn1_EncryptedContent.x \
201         asn1_EncryptedContentInfo.x \
202         asn1_EncryptedKey.x \
203         asn1_EnvelopedData.x \
204         asn1_IssuerAndSerialNumber.x \
205         asn1_KeyEncryptionAlgorithmIdentifier.x \
206         asn1_KeyTransRecipientInfo.x \
207         asn1_MessageDigest.x \
208         asn1_OriginatorInfo.x \
209         asn1_RecipientIdentifier.x \
210         asn1_RecipientInfo.x \
211         asn1_RecipientInfos.x \
212         asn1_SignatureAlgorithmIdentifier.x \
213         asn1_SignatureValue.x \
214         asn1_SignedData.x \
215         asn1_SignerIdentifier.x \
216         asn1_SignerInfo.x \
217         asn1_SignerInfos.x \
218         asn1_id_pkcs7.x \
219         asn1_id_pkcs7_data.x \
220         asn1_id_pkcs7_digestedData.x \
221         asn1_id_pkcs7_encryptedData.x \
222         asn1_id_pkcs7_envelopedData.x \
223         asn1_id_pkcs7_signedAndEnvelopedData.x \
224         asn1_id_pkcs7_signedData.x \
225         asn1_UnprotectedAttributes.x
226
227 GEN_K5= asn1_AD_AND_OR.x \
228         asn1_AD_IF_RELEVANT.x \
229         asn1_AD_KDCIssued.x \
230         asn1_AD_MANDATORY_FOR_KDC.x \
231         asn1_AD_LoginAlias.x \
232         asn1_APOptions.x \
233         asn1_AP_REP.x \
234         asn1_AP_REQ.x \
235         asn1_AS_REP.x \
236         asn1_AS_REQ.x \
237         asn1_AUTHDATA_TYPE.x \
238         asn1_Authenticator.x \
239         asn1_AuthorizationData.x \
240         asn1_AuthorizationDataElement.x \
241         asn1_CKSUMTYPE.x \
242         asn1_ChangePasswdDataMS.x \
243         asn1_Checksum.x \
244         asn1_ENCTYPE.x \
245         asn1_ETYPE_INFO.x \
246         asn1_ETYPE_INFO2.x \
247         asn1_ETYPE_INFO2_ENTRY.x \
248         asn1_ETYPE_INFO_ENTRY.x \
249         asn1_EncAPRepPart.x \
250         asn1_EncASRepPart.x \
251         asn1_EncKDCRepPart.x \
252         asn1_EncKrbCredPart.x \
253         asn1_EncKrbPrivPart.x \
254         asn1_EncTGSRepPart.x \
255         asn1_EncTicketPart.x \
256         asn1_EncryptedData.x \
257         asn1_EncryptionKey.x \
258         asn1_EtypeList.x \
259         asn1_HostAddress.x \
260         asn1_HostAddresses.x \
261         asn1_KDCOptions.x \
262         asn1_KDC_REP.x \
263         asn1_KDC_REQ.x \
264         asn1_KDC_REQ_BODY.x \
265         asn1_KRB_CRED.x \
266         asn1_KRB_ERROR.x \
267         asn1_KRB_PRIV.x \
268         asn1_KRB_SAFE.x \
269         asn1_KRB_SAFE_BODY.x \
270         asn1_KerberosString.x \
271         asn1_KerberosTime.x \
272         asn1_KrbCredInfo.x \
273         asn1_LR_TYPE.x \
274         asn1_LastReq.x \
275         asn1_MESSAGE_TYPE.x \
276         asn1_METHOD_DATA.x \
277         asn1_NAME_TYPE.x \
278         asn1_PADATA_TYPE.x \
279         asn1_PA_DATA.x \
280         asn1_PA_ENC_SAM_RESPONSE_ENC.x \
281         asn1_PA_ENC_TS_ENC.x \
282         asn1_PA_PAC_REQUEST.x \
283         asn1_PA_S4U2Self.x \
284         asn1_PA_SAM_CHALLENGE_2.x \
285         asn1_PA_SAM_CHALLENGE_2_BODY.x  \
286         asn1_PA_SAM_REDIRECT.x \
287         asn1_PA_SAM_RESPONSE_2.x \
288         asn1_PA_SAM_TYPE.x \
289         asn1_PA_ClientCanonicalized.x \
290         asn1_PA_ClientCanonicalizedNames.x \
291         asn1_PA_SvrReferralData.x \
292         asn1_PROV_SRV_LOCATION.x \
293         asn1_Principal.x \
294         asn1_PrincipalName.x \
295         asn1_Realm.x \
296         asn1_SAMFlags.x \
297         asn1_TGS_REP.x \
298         asn1_TGS_REQ.x \
299         asn1_TYPED_DATA.x \
300         asn1_Ticket.x \
301         asn1_TicketFlags.x \
302         asn1_TransitedEncoding.x \
303         asn1_TypedData.x \
304         asn1_krb5int32.x \
305         asn1_krb5uint32.x \
306         asn1_KRB5SignedPathData.x \
307         asn1_KRB5SignedPathPrincipals.x \
308         asn1_KRB5SignedPath.x
309
310 GEN_PKINIT = \
311         asn1_id_pkinit.x \
312         asn1_id_pkauthdata.x \
313         asn1_id_pkdhkeydata.x \
314         asn1_id_pkrkeydata.x \
315         asn1_id_pkekuoid.x \
316         asn1_id_pkkdcekuoid.x \
317         asn1_id_pkinit_san.x \
318         asn1_id_pkinit_ms_eku.x \
319         asn1_id_pkinit_ms_san.x \
320         asn1_MS_UPN_SAN.x \
321         asn1_DHNonce.x \
322         asn1_KDFAlgorithmId.x \
323         asn1_TrustedCA.x \
324         asn1_ExternalPrincipalIdentifier.x \
325         asn1_ExternalPrincipalIdentifiers.x \
326         asn1_PA_PK_AS_REQ.x \
327         asn1_PKAuthenticator.x \
328         asn1_AuthPack.x \
329         asn1_TD_TRUSTED_CERTIFIERS.x \
330         asn1_TD_INVALID_CERTIFICATES.x \
331         asn1_KRB5PrincipalName.x \
332         asn1_AD_INITIAL_VERIFIED_CAS.x \
333         asn1_DHRepInfo.x \
334         asn1_PA_PK_AS_REP.x \
335         asn1_KDCDHKeyInfo.x \
336         asn1_ReplyKeyPack.x \
337         asn1_TD_DH_PARAMETERS.x \
338         asn1_PKAuthenticator_Win2k.x \
339         asn1_AuthPack_Win2k.x \
340         asn1_TrustedCA_Win2k.x \
341         asn1_PA_PK_AS_REQ_Win2k.x \
342         asn1_PA_PK_AS_REP_Win2k.x \
343         asn1_KDCDHKeyInfo_Win2k.x \
344         asn1_ReplyKeyPack_Win2k.x \
345         asn1_PkinitSuppPubInfo.x 
346
347 GEN_PKCS8 = \
348         asn1_PKCS8PrivateKeyAlgorithmIdentifier.x \
349         asn1_PKCS8PrivateKey.x \
350         asn1_PKCS8PrivateKeyInfo.x \
351         asn1_PKCS8Attributes.x \
352         asn1_PKCS8EncryptedPrivateKeyInfo.x \
353         asn1_PKCS8EncryptedData.x
354
355 GEN_PKCS9 = \
356         asn1_id_pkcs_9.x \
357         asn1_id_pkcs9_contentType.x \
358         asn1_id_pkcs9_emailAddress.x \
359         asn1_id_pkcs9_messageDigest.x \
360         asn1_id_pkcs9_signingTime.x \
361         asn1_id_pkcs9_countersignature.x \
362         asn1_id_pkcs_9_at_friendlyName.x \
363         asn1_id_pkcs_9_at_localKeyId.x \
364         asn1_id_pkcs_9_at_certTypes.x \
365         asn1_id_pkcs_9_at_certTypes_x509.x \
366         asn1_PKCS9_BMPString.x \
367         asn1_PKCS9_friendlyName.x
368
369 GEN_PKCS12 = \
370         asn1_id_pkcs_12.x \
371         asn1_id_pkcs_12PbeIds.x \
372         asn1_id_pbeWithSHAAnd128BitRC4.x \
373         asn1_id_pbeWithSHAAnd40BitRC4.x \
374         asn1_id_pbeWithSHAAnd3_KeyTripleDES_CBC.x \
375         asn1_id_pbeWithSHAAnd2_KeyTripleDES_CBC.x \
376         asn1_id_pbeWithSHAAnd128BitRC2_CBC.x \
377         asn1_id_pbewithSHAAnd40BitRC2_CBC.x \
378         asn1_id_pkcs12_bagtypes.x \
379         asn1_id_pkcs12_keyBag.x \
380         asn1_id_pkcs12_pkcs8ShroudedKeyBag.x \
381         asn1_id_pkcs12_certBag.x \
382         asn1_id_pkcs12_crlBag.x \
383         asn1_id_pkcs12_secretBag.x \
384         asn1_id_pkcs12_safeContentsBag.x \
385         asn1_PKCS12_MacData.x \
386         asn1_PKCS12_PFX.x \
387         asn1_PKCS12_AuthenticatedSafe.x \
388         asn1_PKCS12_CertBag.x \
389         asn1_PKCS12_Attribute.x \
390         asn1_PKCS12_Attributes.x \
391         asn1_PKCS12_SafeBag.x \
392         asn1_PKCS12_SafeContents.x \
393         asn1_PKCS12_OctetString.x \
394         asn1_PKCS12_PBEParams.x
395
396 GEN_DIGEST= asn1_DigestError.x \
397         asn1_DigestInit.x \
398         asn1_DigestInitReply.x \
399         asn1_DigestREP.x \
400         asn1_DigestREQ.x \
401         asn1_DigestRepInner.x \
402         asn1_DigestReqInner.x \
403         asn1_DigestRequest.x \
404         asn1_DigestResponse.x \
405         asn1_DigestTypes.x \
406         asn1_NTLMInit.x \
407         asn1_NTLMInitReply.x \
408         asn1_NTLMRequest.x \
409         asn1_NTLMResponse.x
410
411 GEN_KX509 = \
412         asn1_Kx509Response.x \
413         asn1_Kx509Request.x
414
415 GEN+=   ${GEN_RFC2459}
416 GEN+=   ${GEN_CMS}
417 GEN+=   ${GEN_K5}
418 GEN+=   ${GEN_PKINIT}
419 GEN+=   ${GEN_PKCS8}
420 GEN+=   ${GEN_PKCS9}
421 GEN+=   ${GEN_PKCS12}
422 GEN+=   ${GEN_DIGEST}
423 GEN+=   ${GEN_KX509}
424
425 CLEANFILES= ${GEN} ${GEN:S/.x$/.c/} *_asn1_files
426
427 GEN_ASN1=cms_asn1.h rfc2459_asn1.h krb5_asn1.h pkinit_asn1.h
428 GEN_ASN1+=pkcs8_asn1.h pkcs9_asn1.h pkcs12_asn1.h digest_asn1.h kx509_asn1.h 
429 SRCS+= ${GEN_ASN1}
430 INCS+= ${GEN_ASN1}
431 CLEANFILES+=${GEN_ASN1}
432
433 .ORDER: ${GEN} ${GEN_ASN1}
434
435 ${GEN_CMS} cms_asn1.h: CMS.asn1 ../../tools/asn1_compile/asn1_compile
436         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} cms_asn1
437
438 ${GEN_RFC2459} rfc2459_asn1.h: rfc2459.asn1 ../../tools/asn1_compile/asn1_compile
439         ../../tools/asn1_compile/asn1_compile \
440                 --preserve-binary=TBSCertificate \
441                 --preserve-binary=TBSCRLCertList \
442                 --preserve-binary=Name \
443                 --sequence=GeneralNames \
444                 --sequence=Extensions \
445                 --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1
446
447 ${GEN_K5} krb5_asn1.h: k5.asn1 ../../tools/asn1_compile/asn1_compile
448         ../../tools/asn1_compile/asn1_compile \
449                 --encode-rfc1510-bit-string \
450                 --sequence=KRB5SignedPathPrincipals \
451                 --sequence=AuthorizationData \
452                 --sequence=METHOD-DATA \
453                 --sequence=ETYPE-INFO \
454                 --sequence=ETYPE-INFO2 ${.ALLSRC:M*.asn1} krb5_asn1
455
456 ${GEN_PKINIT} pkinit_asn1.h: pkinit.asn1 ../../tools/asn1_compile/asn1_compile
457         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} pkinit_asn1
458
459 ${GEN_PKCS8} pkcs8_asn1.h: pkcs8.asn1 ../../tools/asn1_compile/asn1_compile
460         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} pkcs8_asn1
461
462 ${GEN_PKCS9} pkcs9_asn1.h: pkcs9.asn1 ../../tools/asn1_compile/asn1_compile
463         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} pkcs9_asn1
464
465 ${GEN_PKCS12} pkcs12_asn1.h: pkcs12.asn1 ../../tools/asn1_compile/asn1_compile
466         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} pkcs12_asn1
467
468 ${GEN_DIGEST} digest_asn1.h: digest.asn1 ../../tools/asn1_compile/asn1_compile
469         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} digest_asn1
470
471 ${GEN_KX509} kx509_asn1.h: kx509.asn1 ../../tools/asn1_compile/asn1_compile
472         ../../tools/asn1_compile/asn1_compile ${.ALLSRC:M*.asn1} kx509_asn1
473
474 ../../tools/asn1_compile/asn1_compile:
475         cd ${.CURDIR}/../../tools/asn1_compile && ${MAKE}
476
477 .for I in ${GEN}
478 ${I:R}.c: ${I}
479         cat ${.ALLSRC} > ${.TARGET}
480 .endfor
481
482 .include <bsd.lib.mk>
483
484 .PATH: ${KRB5DIR}/lib/asn1