1#!/bin/sh 2 3 4source=$1 5name=$(basename $1 | sed 's/[._-]/_/') 6target=$2 7 8tmp=$(mktemp /tmp/update-header-XXXXXX) 9if [ "$tmp" = "" ] ; then 10 echo "no tmpfile" 11 exit q 12fi 13 14echo "$name $source $target" 15 16cat > $tmp <<EOF 17struct krb5_dh_moduli; 18struct _krb5_krb_auth_data; 19struct AlgorithmIdentifier; 20struct _krb5_key_data; 21struct _krb5_checksum_type; 22struct _krb5_key_type; 23struct _krb5_encryption_type; 24struct _krb5_srv_query_ctx; 25struct krb5_fast_state; 26struct _krb5_srp_group; 27struct _krb5_srp; 28 29#define KRB5_DEPRECATED 30#define KRB5_DEPRECATED_FUNCTION(x) 31#define GSSAPI_DEPRECATED 32#define HC_DEPRECATED 33#define HC_DEPRECATED_CRYPTO 34#define GSSAPI_DEPRECATED_FUNCTION(x) 35 36#include <config.h> 37#include <krb5.h> 38#include <krb5_asn1.h> 39#include "crypto-headers.h" 40#include <gssapi_rewrite.h> 41#include <GSS.h> 42#include <GSSPrivate.h> 43#include <gssapi.h> 44#include <gssapi_krb5.h> 45#include <gssapi_scram.h> 46#include <gssapi_spnego.h> 47#include <gssapi_ntlm.h> 48#include <gssapi_netlogon.h> 49#include <gssapi_apple.h> 50#include <gssapi_spi.h> 51#include <GSSItem.h> 52#include <heimbase.h> 53#include <heimbasepriv.h> 54#include <hx509.h> 55#include <krb5-private.h> 56#include <roken.h> 57#include <rtbl.h> 58#include <parse_bytes.h> 59#include <krb5_err.h> 60#include <heim_err.h> 61#include <krb_err.h> 62#include <hdb_err.h> 63#include <hx509_err.h> 64#include <heim-ipc.h> 65#include <wind.h> 66#include <parse_units.h> 67#include <parse_time.h> 68#include <base64.h> 69#include <hex.h> 70#include <com_err.h> 71#include <der.h> 72#include <rfc2459_asn1.h> 73#include <cms_asn1.h> 74#include <spnego_asn1.h> 75#include <gkrb5_err.h> 76#include <heimcred.h> 77 78krb5_error_code _gsskrb5_init (krb5_context *); 79 80extern int _krb5_AES_string_to_default_iterator; 81 82struct hx509_collector; 83struct hx_expr; 84struct hx509_generate_private_context; 85struct hx509_keyset_ops; 86typedef struct hx509_path hx509_path; 87typedef void (*_hx509_cert_release_func)(struct hx509_cert_data *, void *); 88 89#include <hx509-private.h> 90 91extern const void *${name}_export[]; 92 93#pragma clang diagnostic push 94#pragma clang diagnostic ignored "-Wdeprecated-declarations" 95const void *${name}_export[] = { 96EOF 97egrep -v '^ *#' $1 | sed -e 's/\([^ ]*\)\([ ]*,private\)*$/\1,/' | sed -e 's/^%\(.*\),$/#\1/' | sed 's/^\([^#]\)/(const void *)\1/' >> $tmp 98 99cat >> $tmp <<EOF 100NULL 101}; 102 103#pragma clang diagnostic pop 104 105EOF 106 107if cmp -s "$tmp" "$target" ; then 108 rm "$tmp" 109else 110 mv "$tmp" "$target" 111fi 112 113exit 0 114