~ubuntu-branches/debian/jessie/cryptsetup/jessie

« back to all changes in this revision

Viewing changes to lib/libcryptsetup.h

  • Committer: Package Import Robot
  • Author(s): Jonas Meurer
  • Date: 2014-03-04 20:14:07 UTC
  • mfrom: (0.2.13)
  • Revision ID: package-import@ubuntu.com-20140304201407-8cn7znmyssyrgduu
Tags: 2:1.6.6-1
* new upsream version 1.6.6.
* add versioned dependency on cryptsetup-bin to cryptsetup. (closes: #747670)
* change versioned build-depends on automake to >= 1.12 to reflect upstream
  requirements. Thanks to Joel Johnson. (closes: #740688)
* build and link against libgcrypt20 (>= 1.6.1). Add note about whirlpool
  bug in older libgcrypt releases and how to deal with it to debian/NEWS.
* add systemd support to askpass. Thanks to David Härdeman for the patch.
  (closes: #742600, #755074)
* fix initramfs cryptroot hook to not include modules unconditionally. Thanks
  to Dmitrijs Ledkovs for bugreport and patch. (closes: #714104)
* fix decrypt_keyctl script to ask again in case of wrong passphrase. Thanks
  to Dmitriy Matrosov for bugreport and patch. (closes: #748368)
* incorporate changes from ubuntu package:
  - don't hardcode paths to udevadm and udevsettle.
  - restore terminal settings in askpass.c. (closes: #714942)
  - migrate upstart jobs to new names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * libcryptsetup - cryptsetup library
3
3
 *
4
 
 * Copyright (C) 2004, Christophe Saout <christophe@saout.de>
 
4
 * Copyright (C) 2004, Jana Saout <jana@saout.de>
5
5
 * Copyright (C) 2004-2007, Clemens Fruhwirth <clemens@endorphin.org>
6
6
 * Copyright (C) 2009-2012, Red Hat, Inc. All rights reserved.
7
7
 * Copyright (C) 2009-2014, Milan Broz
176
176
 * @note Only zero terminated passwords can be entered this way, for complex
177
177
 *   use API functions directly.
178
178
 * @note Maximal length of password is limited to @e length @e - @e 1 (minimal 511 chars)
 
179
 * @note Internal compiled-in terminal input is DEPRECATED and will be removed
 
180
 *   in future versions.
179
181
 *
180
182
 * @see Callback function is used in these call provided, that certain conditions are met:
181
183
 * @li crypt_keyslot_add_by_passphrase
530
532
 * @return unlocked key slot number or negative errno otherwise.
531
533
 *
532
534
 * @note Only LUKS device type is supported
 
535
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
536
 * Internal terminal password query is DEPRECATED and will be removed in next version.
533
537
 */
534
538
int crypt_resume_by_passphrase(struct crypt_device *cd,
535
539
        const char *name,
548
552
 * @param keyfile_offset number of bytes to skip at start of keyfile
549
553
 *
550
554
 * @return unlocked key slot number or negative errno otherwise.
 
555
 *
 
556
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
557
 * Internal terminal password query is DEPRECATED and will be removed in next version.
551
558
 */
552
559
int crypt_resume_by_keyfile_offset(struct crypt_device *cd,
553
560
        const char *name,
594
601
 * @param new_passphrase_size size of @e new_passphrase (binary data)
595
602
 *
596
603
 * @return allocated key slot number or negative errno otherwise.
 
604
 *
 
605
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
606
 * Internal terminal password query is DEPRECATED and will be removed in next version.
597
607
 */
598
608
int crypt_keyslot_add_by_passphrase(struct crypt_device *cd,
599
609
        int keyslot,
620
630
 * @note This function is just internal implementation of luksChange
621
631
 * command to avoid reading of volume key outside libcryptsetup boundary
622
632
 * in FIPS mode.
 
633
 *
 
634
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
635
 * Internal terminal password query is DEPRECATED and will be removed in next version.
623
636
 */
624
637
int crypt_keyslot_change_by_passphrase(struct crypt_device *cd,
625
638
        int keyslot_old,
646
659
 * @return allocated key slot number or negative errno otherwise.
647
660
 *
648
661
 * @note Note that @e keyfile can be "-" for STDIN
649
 
 *
650
662
 */
651
663
int crypt_keyslot_add_by_keyfile_offset(struct crypt_device *cd,
652
664
        int keyslot,
680
692
 *
681
693
 * @return allocated key slot number or negative errno otherwise.
682
694
 *
 
695
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
696
 * Internal terminal password query is DEPRECATED and will be removed in next version.
683
697
 */
684
698
int crypt_keyslot_add_by_volume_key(struct crypt_device *cd,
685
699
        int keyslot,
763
777
 * @param flags activation flags
764
778
 *
765
779
 * @return unlocked key slot number or negative errno otherwise.
 
780
 *
 
781
 * @note If passphrase is @e NULL always use crypt_set_password_callback.
 
782
 * Internal terminal password query is DEPRECATED and will be removed in next version.
766
783
 */
767
784
int crypt_activate_by_passphrase(struct crypt_device *cd,
768
785
        const char *name,