1 # $NetBSD: Makefile,v 1.31 2008/04/21 21:30:59 veego Exp $
3 USE_FORT?
= yes
# network protocol library
9 DIST
= ${NETBSDSRCDIR}/crypto
/dist
10 .PATH
: ${DIST}/heimdal
/lib
/asn1
15 LIBDPLIBS
+= com_err
${.CURDIR
}/..
/libcom_err
17 .if
${USETOOLS} != "yes"
18 COMPILEETOBJ
!= cd
${NETBSDSRCDIR}/lib
/libcom_err
/compile_et
&& ${PRINTOBJDIR}
19 TOOL_COMPILE_ET
= ${COMPILEETOBJ}/compile_et
21 ASN1COMPILEOBJ
!= cd
${NETBSDSRCDIR}/lib
/libasn1
/asn1_compile
&& ${PRINTOBJDIR}
22 TOOL_ASN1_COMPILE
= ${ASN1COMPILEOBJ}/asn1_compile
24 .PHONY
: ${ASN1COMPILEOBJ}/asn1_compile
26 ${ASN1COMPILEOBJ}/asn1_compile
:
27 @cd
${.CURDIR
}/asn1_compile
&& ${MAKE}
42 CLEANFILES
+= asn1_err.h
44 asn1_err.h asn1_err.c
: asn1_err.et
${TOOL_COMPILE_ET}
45 ${TOOL_COMPILE_ET} ${DIST}/heimdal
/lib
/asn1
/asn1_err.et
61 INCSDIR
= /usr
/include/krb5
64 ${gen_files_k5
:.x
=.c
} \
65 ${gen_files_cms
:.x
=.c
} \
66 ${gen_files_rfc2459
:.x
=.c
} \
67 ${gen_files_pkinit
:.x
=.c
} \
68 ${gen_files_pkcs12
:.x
=.c
} \
69 ${gen_files_pkcs8
:.x
=.c
} \
70 ${gen_files_pkcs9
:.x
=.c
} \
71 ${gen_files_digest
:.x
=.c
} \
72 ${gen_files_kx509
:.x
=.c
} \
78 asn1_AD_IF_RELEVANT.x \
80 asn1_AD_MANDATORY_FOR_KDC.x \
81 asn1_AD_LoginAlias.x \
87 asn1_AUTHDATA_TYPE.x \
88 asn1_Authenticator.x \
89 asn1_AuthorizationData.x \
90 asn1_AuthorizationDataElement.x \
92 asn1_ChangePasswdDataMS.x \
97 asn1_ETYPE_INFO2_ENTRY.x \
98 asn1_ETYPE_INFO_ENTRY.x \
100 asn1_EncASRepPart.x \
101 asn1_EncKDCRepPart.x \
102 asn1_EncKrbCredPart.x \
103 asn1_EncKrbPrivPart.x \
104 asn1_EncTGSRepPart.x \
105 asn1_EncTicketPart.x \
106 asn1_EncryptedData.x \
107 asn1_EncryptionKey.x \
110 asn1_HostAddresses.x \
114 asn1_KDC_REQ_BODY.x \
119 asn1_KRB_SAFE_BODY.x \
120 asn1_KerberosString.x \
121 asn1_KerberosTime.x \
125 asn1_MESSAGE_TYPE.x \
130 asn1_PA_ENC_SAM_RESPONSE_ENC.x \
131 asn1_PA_ENC_TS_ENC.x \
132 asn1_PA_PAC_REQUEST.x \
134 asn1_PA_SAM_CHALLENGE_2.x \
135 asn1_PA_SAM_CHALLENGE_2_BODY.x \
136 asn1_PA_SAM_REDIRECT.x \
137 asn1_PA_SAM_RESPONSE_2.x \
139 asn1_PA_ClientCanonicalized.x \
140 asn1_PA_ClientCanonicalizedNames.x \
141 asn1_PA_SvrReferralData.x \
142 asn1_PROV_SRV_LOCATION.x \
144 asn1_PrincipalName.x \
152 asn1_TransitedEncoding.x \
156 asn1_KRB5SignedPathData.x \
157 asn1_KRB5SignedPathPrincipals.x \
158 asn1_KRB5SignedPath.x
161 asn1_CMSAttributes.x \
162 asn1_CMSCBCParameter.x \
163 asn1_CMSEncryptedData.x \
164 asn1_CMSIdentifier.x \
165 asn1_CMSRC2CBCParameter.x \
167 asn1_CertificateList.x \
168 asn1_CertificateRevocationLists.x \
169 asn1_CertificateSet.x \
170 asn1_ContentEncryptionAlgorithmIdentifier.x \
173 asn1_DigestAlgorithmIdentifier.x \
174 asn1_DigestAlgorithmIdentifiers.x \
175 asn1_EncapsulatedContentInfo.x \
176 asn1_EncryptedContent.x \
177 asn1_EncryptedContentInfo.x \
178 asn1_EncryptedKey.x \
179 asn1_EnvelopedData.x \
180 asn1_IssuerAndSerialNumber.x \
181 asn1_KeyEncryptionAlgorithmIdentifier.x \
182 asn1_KeyTransRecipientInfo.x \
183 asn1_MessageDigest.x \
184 asn1_OriginatorInfo.x \
185 asn1_RecipientIdentifier.x \
186 asn1_RecipientInfo.x \
187 asn1_RecipientInfos.x \
188 asn1_SignatureAlgorithmIdentifier.x \
189 asn1_SignatureValue.x \
191 asn1_SignerIdentifier.x \
195 asn1_id_pkcs7_data.x \
196 asn1_id_pkcs7_digestedData.x \
197 asn1_id_pkcs7_encryptedData.x \
198 asn1_id_pkcs7_envelopedData.x \
199 asn1_id_pkcs7_signedAndEnvelopedData.x \
200 asn1_id_pkcs7_signedData.x \
201 asn1_UnprotectedAttributes.x
203 gen_files_rfc2459
= \
206 asn1_id_pkcs1_rsaEncryption.x \
207 asn1_id_pkcs1_md2WithRSAEncryption.x \
208 asn1_id_pkcs1_md5WithRSAEncryption.x \
209 asn1_id_pkcs1_sha1WithRSAEncryption.x \
210 asn1_id_pkcs1_sha256WithRSAEncryption.x \
211 asn1_id_pkcs1_sha384WithRSAEncryption.x \
212 asn1_id_pkcs1_sha512WithRSAEncryption.x \
213 asn1_id_heim_rsa_pkcs1_x509.x \
215 asn1_id_pkcs2_md2.x \
216 asn1_id_pkcs2_md4.x \
217 asn1_id_pkcs2_md5.x \
218 asn1_id_rsa_digestAlgorithm.x \
219 asn1_id_rsa_digest_md2.x \
220 asn1_id_rsa_digest_md4.x \
221 asn1_id_rsa_digest_md5.x \
223 asn1_id_pkcs3_rc2_cbc.x \
224 asn1_id_pkcs3_rc4.x \
225 asn1_id_pkcs3_des_ede3_cbc.x \
226 asn1_id_rsadsi_encalg.x \
227 asn1_id_rsadsi_rc2_cbc.x \
228 asn1_id_rsadsi_des_ede3_cbc.x \
229 asn1_id_secsig_sha_1.x \
230 asn1_id_nistAlgorithm.x \
231 asn1_id_nist_aes_algs.x \
232 asn1_id_aes_128_cbc.x \
233 asn1_id_aes_192_cbc.x \
234 asn1_id_aes_256_cbc.x \
235 asn1_id_nist_sha_algs.x \
240 asn1_id_dhpublicnumber.x \
243 asn1_id_dsa_with_sha1.x \
245 asn1_id_at_commonName.x \
246 asn1_id_at_surname.x \
247 asn1_id_at_serialNumber.x \
248 asn1_id_at_countryName.x \
249 asn1_id_at_localityName.x \
250 asn1_id_at_streetAddress.x \
251 asn1_id_at_stateOrProvinceName.x \
252 asn1_id_at_organizationName.x \
253 asn1_id_at_organizationalUnitName.x \
255 asn1_id_at_givenName.x \
256 asn1_id_at_initials.x \
257 asn1_id_at_generationQualifier.x \
258 asn1_id_at_pseudonym.x \
260 asn1_id_domainComponent.x \
262 asn1_id_uspkicommon_card_id.x \
263 asn1_id_uspkicommon_piv_interim.x \
265 asn1_id_netscape_cert_comment.x \
266 asn1_id_ms_cert_enroll_domaincontroller.x \
267 asn1_id_ms_client_authentication.x \
268 asn1_AlgorithmIdentifier.x \
269 asn1_AttributeType.x \
270 asn1_AttributeValue.x \
271 asn1_TeletexStringx.x \
272 asn1_DirectoryString.x \
274 asn1_AttributeTypeAndValue.x \
275 asn1_AuthorityInfoAccessSyntax.x \
276 asn1_AccessDescription.x \
277 asn1_RelativeDistinguishedName.x \
280 asn1_CertificateSerialNumber.x \
283 asn1_UniqueIdentifier.x \
284 asn1_SubjectPublicKeyInfo.x \
287 asn1_TBSCertificate.x \
289 asn1_Certificates.x \
290 asn1_ValidationParms.x \
291 asn1_DomainParameters.x \
295 asn1_GeneralNames.x \
296 asn1_id_x509_ce_keyUsage.x \
298 asn1_id_x509_ce_authorityKeyIdentifier.x \
299 asn1_KeyIdentifier.x \
300 asn1_AuthorityKeyIdentifier.x \
301 asn1_id_x509_ce_subjectKeyIdentifier.x \
302 asn1_SubjectKeyIdentifier.x \
303 asn1_id_x509_ce_basicConstraints.x \
304 asn1_BasicConstraints.x \
305 asn1_id_x509_ce_nameConstraints.x \
306 asn1_BaseDistance.x \
307 asn1_GeneralSubtree.x \
308 asn1_GeneralSubtrees.x \
309 asn1_NameConstraints.x \
310 asn1_id_x509_ce_privateKeyUsagePeriod.x \
311 asn1_id_x509_ce_certificatePolicies.x \
312 asn1_id_x509_ce_policyMappings.x \
313 asn1_id_x509_ce_subjectAltName.x \
314 asn1_id_x509_ce_issuerAltName.x \
315 asn1_id_x509_ce_subjectDirectoryAttributes.x \
316 asn1_id_x509_ce_policyConstraints.x \
317 asn1_id_x509_ce_extKeyUsage.x \
319 asn1_id_x509_ce_cRLDistributionPoints.x \
320 asn1_id_x509_ce_deltaCRLIndicator.x \
321 asn1_id_x509_ce_issuingDistributionPoint.x \
322 asn1_id_x509_ce_holdInstructionCode.x \
323 asn1_id_x509_ce_invalidityDate.x \
324 asn1_id_x509_ce_certificateIssuer.x \
325 asn1_id_x509_ce_inhibitAnyPolicy.x \
326 asn1_DistributionPointReasonFlags.x \
327 asn1_DistributionPointName.x \
328 asn1_DistributionPoint.x \
329 asn1_CRLDistributionPoints.x \
331 asn1_DSAPublicKey.x \
333 asn1_RSAPublicKey.x \
334 asn1_RSAPrivateKey.x \
336 asn1_TBSCRLCertList.x \
337 asn1_CRLCertificateList.x \
338 asn1_id_x509_ce_cRLNumber.x \
339 asn1_id_x509_ce_freshestCRL.x \
340 asn1_id_x509_ce_cRLReason.x \
342 asn1_PKIXXmppAddr.x \
345 asn1_id_pkix_on_dnsSRV.x \
346 asn1_id_pkix_on_xmppAddr.x \
348 asn1_id_pkix_kp_serverAuth.x \
349 asn1_id_pkix_kp_clientAuth.x \
350 asn1_id_pkix_kp_emailProtection.x \
351 asn1_id_pkix_kp_timeStamping.x \
352 asn1_id_pkix_kp_OCSPSigning.x \
354 asn1_id_pkix_pe_authorityInfoAccess.x \
355 asn1_id_pkix_pe_proxyCertInfo.x \
357 asn1_id_pkix_ppl_anyLanguage.x \
358 asn1_id_pkix_ppl_inheritAll.x \
359 asn1_id_pkix_ppl_independent.x \
365 asn1_id_pkauthdata.x \
366 asn1_id_pkdhkeydata.x \
367 asn1_id_pkrkeydata.x \
369 asn1_id_pkkdcekuoid.x \
370 asn1_id_pkinit_san.x \
371 asn1_id_pkinit_ms_eku.x \
372 asn1_id_pkinit_ms_san.x \
375 asn1_KDFAlgorithmId.x \
377 asn1_ExternalPrincipalIdentifier.x \
378 asn1_ExternalPrincipalIdentifiers.x \
379 asn1_PA_PK_AS_REQ.x \
380 asn1_PKAuthenticator.x \
382 asn1_TD_TRUSTED_CERTIFIERS.x \
383 asn1_TD_INVALID_CERTIFICATES.x \
384 asn1_KRB5PrincipalName.x \
385 asn1_AD_INITIAL_VERIFIED_CAS.x \
387 asn1_PA_PK_AS_REP.x \
388 asn1_KDCDHKeyInfo.x \
389 asn1_TrustedCA_Win2k.x \
390 asn1_ReplyKeyPack.x \
391 asn1_TD_DH_PARAMETERS.x \
392 asn1_PKAuthenticator_Win2k.x \
393 asn1_AuthPack_Win2k.x \
394 asn1_PA_PK_AS_REP_Win2k.x \
395 asn1_KDCDHKeyInfo_Win2k.x \
396 asn1_PA_PK_AS_REQ_Win2k.x \
397 asn1_ReplyKeyPack_Win2k.x \
398 asn1_PkinitSuppPubInfo.x
402 asn1_id_pkcs_12PbeIds.x \
403 asn1_id_pbeWithSHAAnd128BitRC4.x \
404 asn1_id_pbeWithSHAAnd40BitRC4.x \
405 asn1_id_pbeWithSHAAnd3_KeyTripleDES_CBC.x \
406 asn1_id_pbeWithSHAAnd2_KeyTripleDES_CBC.x \
407 asn1_id_pbeWithSHAAnd128BitRC2_CBC.x \
408 asn1_id_pbewithSHAAnd40BitRC2_CBC.x \
409 asn1_id_pkcs12_bagtypes.x \
410 asn1_id_pkcs12_keyBag.x \
411 asn1_id_pkcs12_pkcs8ShroudedKeyBag.x \
412 asn1_id_pkcs12_certBag.x \
413 asn1_id_pkcs12_crlBag.x \
414 asn1_id_pkcs12_secretBag.x \
415 asn1_id_pkcs12_safeContentsBag.x \
416 asn1_PKCS12_MacData.x \
418 asn1_PKCS12_AuthenticatedSafe.x \
419 asn1_PKCS12_CertBag.x \
420 asn1_PKCS12_Attribute.x \
421 asn1_PKCS12_Attributes.x \
422 asn1_PKCS12_SafeBag.x \
423 asn1_PKCS12_SafeContents.x \
424 asn1_PKCS12_OctetString.x \
425 asn1_PKCS12_PBEParams.x
428 asn1_PKCS8PrivateKeyAlgorithmIdentifier.x \
429 asn1_PKCS8PrivateKey.x \
430 asn1_PKCS8PrivateKeyInfo.x \
431 asn1_PKCS8Attributes.x \
432 asn1_PKCS8EncryptedPrivateKeyInfo.x \
433 asn1_PKCS8EncryptedData.x
437 asn1_id_pkcs9_contentType.x \
438 asn1_id_pkcs9_emailAddress.x \
439 asn1_id_pkcs9_messageDigest.x \
440 asn1_id_pkcs9_signingTime.x \
441 asn1_id_pkcs9_countersignature.x \
442 asn1_id_pkcs_9_at_friendlyName.x \
443 asn1_id_pkcs_9_at_localKeyId.x \
444 asn1_id_pkcs_9_at_certTypes.x \
445 asn1_id_pkcs_9_at_certTypes_x509.x \
446 asn1_PKCS9_BMPString.x \
447 asn1_PKCS9_friendlyName.x
452 asn1_DigestInitReply.x \
455 asn1_DigestRepInner.x \
456 asn1_DigestReqInner.x \
457 asn1_DigestRequest.x \
458 asn1_DigestResponse.x \
461 asn1_NTLMInitReply.x \
466 asn1_Kx509Response.x \
483 -I
${DIST}/heimdal
/lib
/asn1 \
484 -I
${NETBSDSRCDIR}/include/heimdal \
485 -I
${NETBSDSRCDIR}/lib
/libroken \
486 -I
${DIST}/heimdal
/lib
/roken \
487 -I
${DIST}/heimdal
/lib
/com_err \
490 .if
(${USE_INET6} != "no")
491 CPPFLAGS
+=-DHAVE_IPV6
494 ${gen_files_k5} krb5_asn1.hx
: krb5_asn1_files
495 ${gen_files_cms} cms_asn1.hx
: cms_asn1_files
496 ${gen_files_rfc2459} rfc2459_asn1.hx
: rfc2459_asn1_files
497 ${gen_files_pkinit} pkinit_asn1.hx
: pkinit_asn1_files
498 ${gen_files_pkcs12} pkcs12_asn1.hx
: pkcs12_asn1_files
499 ${gen_files_pkcs8} pkcs8_asn1.hx
: pkcs8_asn1_files
500 ${gen_files_pkcs9} pkcs9_asn1.hx
: pkcs9_asn1_files
501 ${gen_files_digest} digest_asn1.hx
: digest_asn1_files
502 ${gen_files_kx509} kx509_asn1.hx
: kx509_asn1_files
504 krb5_asn1_files
: k5.asn1
${TOOL_ASN1_COMPILE}
505 ${TOOL_ASN1_COMPILE} \
506 --encode-rfc1510-bit-string \
507 --sequence
=KRB5SignedPathPrincipals \
508 --sequence
=AuthorizationData \
509 --sequence
=METHOD-DATA \
510 --sequence
=ETYPE-INFO \
511 --sequence
=ETYPE-INFO2 \
512 ${DIST}/heimdal
/lib
/asn1
/k5.asn1 krb5_asn1
513 cms_asn1_files
: CMS.asn1
${TOOL_ASN1_COMPILE}
514 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/CMS.asn1 cms_asn1
515 rfc2459_asn1_files
: rfc2459.asn1
${TOOL_ASN1_COMPILE}
516 ${TOOL_ASN1_COMPILE} \
517 --preserve-binary
=TBSCertificate \
518 --preserve-binary
=TBSCRLCertList \
519 --preserve-binary
=Name \
520 --sequence
=GeneralNames \
521 --sequence
=Extensions \
522 --sequence
=CRLDistributionPoints \
523 ${DIST}/heimdal
/lib
/asn1
/rfc2459.asn1 rfc2459_asn1
524 pkinit_asn1_files
: pkinit.asn1
${TOOL_ASN1_COMPILE}
525 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/pkinit.asn1 pkinit_asn1
526 pkcs12_asn1_files
: pkcs12.asn1
${TOOL_ASN1_COMPILE}
527 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/pkcs12.asn1 pkcs12_asn1
528 pkcs8_asn1_files
: pkcs8.asn1
${TOOL_ASN1_COMPILE}
529 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/pkcs8.asn1 pkcs8_asn1
530 pkcs9_asn1_files
: pkcs9.asn1
${TOOL_ASN1_COMPILE}
531 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/pkcs9.asn1 pkcs9_asn1
532 digest_asn1_files
: digest.asn1
${TOOL_ASN1_COMPILE}
533 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/digest.asn1 digest_asn1
534 kx509_asn1_files
: kx509.asn1
${TOOL_ASN1_COMPILE}
535 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal
/lib
/asn1
/kx509.asn1 kx509_asn1
537 CLEANFILES
= ${BUILT_SOURCES} ${gen_files_k5} \
538 ${gen_files_cms} ${gen_files_rfc2459} \
539 ${gen_files_pkinit} ${gen_files_pkcs12} \
540 ${gen_files_pkcs8} ${gen_files_pkcs9} \
541 ${gen_files_digest} ${gen_files_kx509} \
542 krb5_asn1_files krb5_asn1.h krb5_asn1.hx \
543 cms_asn1_files cms_asn1.h cms_asn1.hx \
544 rfc2459_asn1_files rfc2459_asn1.h rfc2459_asn1.hx \
545 pkinit_asn1_files pkinit_asn1.h pkinit_asn1.hx \
546 pkcs12_asn1_files pkcs12_asn1.h pkcs12_asn1.hx \
547 pkcs8_asn1_files pkcs8_asn1.h pkcs8_asn1.hx \
548 pkcs9_asn1_files pkcs9_asn1.h pkcs9_asn1.hx \
549 digest_asn1_files digest_asn1.h digest_asn1.hx \
550 kx509_asn1_files kx509_asn1.h kx509_asn1.hx
552 .if
${USETOOLS} != "yes"
556 .
include <bsd.lib.mk
>
557 .if
${USETOOLS} != "yes"
558 .
include <bsd.subdir.mk
>
564 @cmp
-s
$< $@
2> /dev
/null || cp
$< $@
567 @cmp
-s
$< $@
2> /dev
/null || cp
$< $@