~ubuntu-branches/ubuntu/natty/ca-certificates/natty

« back to all changes in this revision

Viewing changes to debian/config.in

  • Committer: Bazaar Package Importer
  • Author(s): Philipp Kern
  • Date: 2008-08-09 14:58:24 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20080809145824-4g3eot1a99uxmwzj
* New cacert.org.pem joining both CACert Class 1 and Class 3 certificates.
  This file can be used for proper certificate chaining if CACert
  server certificates are used.  The old class3.pem and root.pem
  certificates are deprecated.  This new file could safely serve as
  a replacement for both.  (Closes: #494343)
* This also reintroduces the old name for the CACert certificate,
  thus closing a long-standing bug about its rename to root.crt.
  (Closes: #413766)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
action="$1"
7
7
cur_version="$2"
8
8
this_version='#VERSION#'
 
9
pt_BR_fixed_version="20080616"
9
10
 
10
11
if test -f /etc/ca-certificates.conf; then
11
12
  CERTSCONF=/etc/ca-certificates.conf
158
159
# mark seen true, so that dont ask again while postinst 
159
160
db_fset ca-certificates/new_crts seen true
160
161
 
161
 
db_set ca-certificates/enable_crts "$CERTS_ENABLED"
162
 
db_subst ca-certificates/enable_crts enable_crts "$CERTS_AVAILABLE"
163
 
if test "$seen" != true; then
164
 
 db_fset ca-certificates/enable_crts seen false
165
 
fi
166
 
db_title "ca-certificates configuration"
167
 
db_input low ca-certificates/enable_crts || true
168
 
db_go
 
162
# Ideally, we would be able to ask debconf for the language it's using, or
 
163
# at least have a shell binding for setlocale(). Since we don't, we have to
 
164
# do it all by hand.
 
165
is_pt_BR () {
 
166
  current_lc_messages="$(eval `locale`; echo "$LC_MESSAGES")"
 
167
  case "$LANGUAGE" in
 
168
    pt_BR*)
 
169
      return 0
 
170
      ;;
 
171
    *)
 
172
      case "$current_lc_messages" in
 
173
        pt_BR*)
 
174
          return 0
 
175
          ;;
 
176
      esac
 
177
  esac
 
178
  return 1
 
179
}
 
180
 
 
181
PRIO=low
 
182
set_values=true
 
183
 
 
184
if dpkg --compare-versions "$cur_version" lt-nl "$pt_BR_fixed_version"; then
 
185
  asked="false"
 
186
  if db_fget ca-certificates/enable_crts asked_pt_br_question; then
 
187
    asked="$RET"
 
188
  fi
 
189
  if [ "$asked" != "true" ]; then
 
190
    if [ -e "/etc/ssl/certs/ca-certificates.crt" ] && [ ! -s "/etc/ssl/certs/ca-certificates.crt" ]; then
 
191
      pt_seen="false"
 
192
      if db_fget ca-certificates/enable_crts seen; then
 
193
        pt_seen="$RET"
 
194
      fi
 
195
      if [ "$pt_seen" = "false" ]; then
 
196
        CERTS_ENABLED="$CERTS_AVAILABLE"
 
197
      elif is_pt_BR; then
 
198
        PRIO=critical
 
199
        CERTS_ENABLED="$CERTS_AVAILABLE"
 
200
        seen=false
 
201
      else
 
202
        seen=true
 
203
      fi
 
204
    fi
 
205
  else
 
206
    set_values=false
 
207
  fi
 
208
fi
 
209
 
 
210
if [ "$set_values" = "true" ]; then
 
211
  db_set ca-certificates/enable_crts "$CERTS_ENABLED"
 
212
  db_subst ca-certificates/enable_crts enable_crts "$CERTS_AVAILABLE"
 
213
  if test "$seen" != true; then
 
214
   db_fset ca-certificates/enable_crts seen false
 
215
  fi
 
216
  db_title "ca-certificates configuration"
 
217
  db_input $PRIO ca-certificates/enable_crts || true
 
218
  db_go
 
219
 
 
220
  if [ "$PRIO" = "critical" ]; then
 
221
    db_fset ca-certificates/enable_crts asked_pt_br_question true
 
222
  fi
 
223
fi
 
224
 
169
225
exit 0