~ubuntu-branches/ubuntu/maverick/gnutls26/maverick-security

« back to all changes in this revision

Viewing changes to doc/gnutls.info-2

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2009-04-14 14:23:19 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090414142319-ok7xejzbqkofno1q
Tags: 2.6.5-1
* Sync sections in debian/control with override file. libgnutls26-dbg is
  section debug, guile-gnutls is section lisp.
* New upstream version. (Needed for Libtasn1-3 2.0)
* New patch 15_tasn1inpc.diff. Make sure libtasn1 is listed in Libs.private.
* Standards-Version: 3.8.1, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
This is gnutls.info, produced by makeinfo version 4.11 from gnutls.texi.
 
1
This is gnutls.info, produced by makeinfo version 4.13 from gnutls.texi.
2
2
 
3
 
This manual is last updated 15 September 2008 for version 2.4.2 of GNU
4
 
TLS.
 
3
This manual is last updated 11 April 2009 for version 2.6.5 of GNU TLS.
5
4
 
6
5
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
7
6
Software Foundation, Inc.
895
894
          gnutls_x509_crt_t CRT, time_t REVOCATION_TIME)
896
895
     CRL: should contain a gnutls_x509_crl_t structure
897
896
 
898
 
     CRT: should contain a gnutls_x509_crt_t structure with the revoked
 
897
     CRT: a certificate of type `gnutls_x509_crt_t' with the revoked
899
898
     certificate
900
899
 
901
900
     REVOCATION_TIME: The time this certificate was revoked
1305
1304
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
1306
1305
     negative error value.
1307
1306
 
 
1307
gnutls_x509_crq_set_key_rsa_raw
 
1308
-------------------------------
 
1309
 
 
1310
 -- Function: int gnutls_x509_crq_set_key_rsa_raw (gnutls_x509_crq_t
 
1311
          CRQ, const gnutls_datum_t * M, const gnutls_datum_t * E)
 
1312
     CRQ: should contain a `gnutls_x509_crq_t' structure
 
1313
 
 
1314
     M: holds the modulus
 
1315
 
 
1316
     E: holds the public exponent
 
1317
 
 
1318
     This function will set the public parameters from the given private
 
1319
     key to the request. Only RSA keys are currently supported.
 
1320
 
 
1321
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
 
1322
     negative error value.
 
1323
 
 
1324
     *Since:* 2.6.0
 
1325
 
1308
1326
gnutls_x509_crq_set_key
1309
1327
-----------------------
1310
1328
 
1431
1449
 
1432
1450
 -- Function: int gnutls_x509_crt_cpy_crl_dist_points
1433
1451
          (gnutls_x509_crt_t DST, gnutls_x509_crt_t SRC)
1434
 
     DST: should contain a gnutls_x509_crt_t structure
 
1452
     DST: a certificate of type `gnutls_x509_crt_t'
1435
1453
 
1436
1454
     SRC: the certificate where the dist points will be copied from
1437
1455
 
2169
2187
 
2170
2188
 -- Function: int gnutls_x509_crt_get_subject_alt_name2
2171
2189
          (gnutls_x509_crt_t CERT, unsigned int SEQ, void * RET, size_t
2172
 
          * RET_SIZE, unsigned int* RET_TYPE, unsigned int * CRITICAL)
 
2190
          * RET_SIZE, unsigned int * RET_TYPE, unsigned int * CRITICAL)
2173
2191
     CERT: should contain a `gnutls_x509_crt_t' structure
2174
2192
 
2175
2193
     SEQ: specifies the sequence number of the alt name (0 for the
2462
2480
 
2463
2481
 -- Function: int gnutls_x509_crt_set_activation_time
2464
2482
          (gnutls_x509_crt_t CERT, time_t ACT_TIME)
2465
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2483
     CERT: a certificate of type `gnutls_x509_crt_t'
2466
2484
 
2467
2485
     ACT_TIME: The actual time
2468
2486
 
2477
2495
 
2478
2496
 -- Function: int gnutls_x509_crt_set_authority_key_id
2479
2497
          (gnutls_x509_crt_t CERT, const void * ID, size_t ID_SIZE)
2480
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2498
     CERT: a certificate of type `gnutls_x509_crt_t'
2481
2499
 
2482
2500
     ID: The key ID
2483
2501
 
2496
2514
 -- Function: int gnutls_x509_crt_set_basic_constraints
2497
2515
          (gnutls_x509_crt_t CRT, unsigned int CA, int
2498
2516
          PATHLENCONSTRAINT)
2499
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2517
     CRT: a certificate of type `gnutls_x509_crt_t'
2500
2518
 
2501
2519
     CA: true(1) or false(0). Depending on the Certificate authority
2502
2520
     status.
2515
2533
 
2516
2534
 -- Function: int gnutls_x509_crt_set_ca_status (gnutls_x509_crt_t CRT,
2517
2535
          unsigned int CA)
2518
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2536
     CRT: a certificate of type `gnutls_x509_crt_t'
2519
2537
 
2520
2538
     CA: true(1) or false(0). Depending on the Certificate authority
2521
2539
     status.
2527
2545
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
2528
2546
     negative error value.
2529
2547
 
 
2548
gnutls_x509_crt_set_crl_dist_points2
 
2549
------------------------------------
 
2550
 
 
2551
 -- Function: int gnutls_x509_crt_set_crl_dist_points2
 
2552
          (gnutls_x509_crt_t CRT, gnutls_x509_subject_alt_name_t TYPE,
 
2553
          const void * DATA, unsigned int DATA_SIZE, unsigned int
 
2554
          REASON_FLAGS)
 
2555
     CRT: a certificate of type `gnutls_x509_crt_t'
 
2556
 
 
2557
     TYPE: is one of the gnutls_x509_subject_alt_name_t enumerations
 
2558
 
 
2559
     DATA: The data to be set
 
2560
 
 
2561
     DATA_SIZE: The data size
 
2562
 
 
2563
     REASON_FLAGS: revocation reasons
 
2564
 
 
2565
     This function will set the CRL distribution points certificate
 
2566
     extension.
 
2567
 
 
2568
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
 
2569
     negative error value.
 
2570
 
 
2571
     *Since:* 2.6.0
 
2572
 
2530
2573
gnutls_x509_crt_set_crl_dist_points
2531
2574
-----------------------------------
2532
2575
 
2533
2576
 -- Function: int gnutls_x509_crt_set_crl_dist_points
2534
2577
          (gnutls_x509_crt_t CRT, gnutls_x509_subject_alt_name_t TYPE,
2535
2578
          const void * DATA_STRING, unsigned int REASON_FLAGS)
2536
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2579
     CRT: a certificate of type `gnutls_x509_crt_t'
2537
2580
 
2538
2581
     TYPE: is one of the gnutls_x509_subject_alt_name_t enumerations
2539
2582
 
2552
2595
 
2553
2596
 -- Function: int gnutls_x509_crt_set_crq (gnutls_x509_crt_t CRT,
2554
2597
          gnutls_x509_crq_t CRQ)
2555
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2598
     CRT: a certificate of type `gnutls_x509_crt_t'
2556
2599
 
2557
2600
     CRQ: holds a certificate request
2558
2601
 
2569
2612
 -- Function: int gnutls_x509_crt_set_dn_by_oid (gnutls_x509_crt_t CRT,
2570
2613
          const char * OID, unsigned int RAW_FLAG, const void * NAME,
2571
2614
          unsigned int SIZEOF_NAME)
2572
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2615
     CRT: a certificate of type `gnutls_x509_crt_t'
2573
2616
 
2574
2617
     OID: holds an Object Identifier in a null terminated string
2575
2618
 
2597
2640
 
2598
2641
 -- Function: int gnutls_x509_crt_set_expiration_time
2599
2642
          (gnutls_x509_crt_t CERT, time_t EXP_TIME)
2600
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2643
     CERT: a certificate of type `gnutls_x509_crt_t'
2601
2644
 
2602
2645
     EXP_TIME: The actual time
2603
2646
 
2612
2655
 -- Function: int gnutls_x509_crt_set_extension_by_oid
2613
2656
          (gnutls_x509_crt_t CRT, const char * OID, const void * BUF,
2614
2657
          size_t SIZEOF_BUF, unsigned int CRITICAL)
2615
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2658
     CRT: a certificate of type `gnutls_x509_crt_t'
2616
2659
 
2617
2660
     OID: holds an Object Identified in null terminated string
2618
2661
 
2636
2679
 -- Function: int gnutls_x509_crt_set_issuer_dn_by_oid
2637
2680
          (gnutls_x509_crt_t CRT, const char * OID, unsigned int
2638
2681
          RAW_FLAG, const void * NAME, unsigned int SIZEOF_NAME)
2639
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2682
     CRT: a certificate of type `gnutls_x509_crt_t'
2640
2683
 
2641
2684
     OID: holds an Object Identifier in a null terminated string
2642
2685
 
2669
2712
 -- Function: int gnutls_x509_crt_set_key_purpose_oid
2670
2713
          (gnutls_x509_crt_t CERT, const void * OID, unsigned int
2671
2714
          CRITICAL)
2672
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2715
     CERT: a certificate of type `gnutls_x509_crt_t'
2673
2716
 
2674
2717
     OID: a pointer to a null terminated string that holds the OID
2675
2718
 
2688
2731
 
2689
2732
 -- Function: int gnutls_x509_crt_set_key_usage (gnutls_x509_crt_t CRT,
2690
2733
          unsigned int USAGE)
2691
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2734
     CRT: a certificate of type `gnutls_x509_crt_t'
2692
2735
 
2693
2736
     USAGE: an ORed sequence of the GNUTLS_KEY_* elements.
2694
2737
 
2702
2745
 
2703
2746
 -- Function: int gnutls_x509_crt_set_key (gnutls_x509_crt_t CRT,
2704
2747
          gnutls_x509_privkey_t KEY)
2705
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2748
     CRT: a certificate of type `gnutls_x509_crt_t'
2706
2749
 
2707
2750
     KEY: holds a private key
2708
2751
 
2745
2788
 -- Function: int gnutls_x509_crt_set_proxy (gnutls_x509_crt_t CRT, int
2746
2789
          PATHLENCONSTRAINT, const char * POLICYLANGUAGE, const char *
2747
2790
          POLICY, size_t SIZEOF_POLICY)
2748
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2791
     CRT: a certificate of type `gnutls_x509_crt_t'
2749
2792
 
2750
2793
     PATHLENCONSTRAINT: non-negative values indicate maximum length of
2751
2794
     path, and negative values indicate that the pathLenConstraints
2767
2810
 
2768
2811
 -- Function: int gnutls_x509_crt_set_serial (gnutls_x509_crt_t CERT,
2769
2812
          const void * SERIAL, size_t SERIAL_SIZE)
2770
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2813
     CERT: a certificate of type `gnutls_x509_crt_t'
2771
2814
 
2772
2815
     SERIAL: The serial number
2773
2816
 
2781
2824
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
2782
2825
     negative error value.
2783
2826
 
 
2827
gnutls_x509_crt_set_subject_alt_name
 
2828
------------------------------------
 
2829
 
 
2830
 -- Function: int gnutls_x509_crt_set_subject_alt_name
 
2831
          (gnutls_x509_crt_t CRT, gnutls_x509_subject_alt_name_t TYPE,
 
2832
          const void * DATA, unsigned int DATA_SIZE, unsigned int FLAGS)
 
2833
     CRT: a certificate of type `gnutls_x509_crt_t'
 
2834
 
 
2835
     TYPE: is one of the gnutls_x509_subject_alt_name_t enumerations
 
2836
 
 
2837
     DATA: The data to be set
 
2838
 
 
2839
     DATA_SIZE: The size of data to be set
 
2840
 
 
2841
     FLAGS: GNUTLS_FSAN_SET to clear previous data or
 
2842
     GNUTLS_FSAN_APPEND to append.
 
2843
 
 
2844
     This function will set the subject alternative name certificate
 
2845
     extension. It can set the following types:
 
2846
 
 
2847
     &GNUTLS_SAN_DNSNAME: as a text string
 
2848
 
 
2849
     &GNUTLS_SAN_RFC822NAME: as a text string
 
2850
 
 
2851
     &GNUTLS_SAN_URI: as a text string
 
2852
 
 
2853
     &GNUTLS_SAN_IPADDRESS: as a binary IP address (4 or 16 bytes)
 
2854
 
 
2855
     Other values can be set as binary values with the proper DER
 
2856
     encoding.
 
2857
 
 
2858
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
 
2859
     negative error value.
 
2860
 
 
2861
     *Since:* 2.6.0
 
2862
 
2784
2863
gnutls_x509_crt_set_subject_alternative_name
2785
2864
--------------------------------------------
2786
2865
 
2787
2866
 -- Function: int gnutls_x509_crt_set_subject_alternative_name
2788
2867
          (gnutls_x509_crt_t CRT, gnutls_x509_subject_alt_name_t TYPE,
2789
2868
          const char * DATA_STRING)
2790
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2869
     CRT: a certificate of type `gnutls_x509_crt_t'
2791
2870
 
2792
2871
     TYPE: is one of the gnutls_x509_subject_alt_name_t enumerations
2793
2872
 
2794
2873
     DATA_STRING: The data to be set, a zero terminated string
2795
2874
 
2796
2875
     This function will set the subject alternative name certificate
2797
 
     extension.
 
2876
     extension. This function assumes that data can be expressed as a
 
2877
     null terminated string.
 
2878
 
 
2879
     The name of the function is unfortunate since it is incosistent
 
2880
     with `gnutls_x509_crt_get_subject_alt_name()'.
2798
2881
 
2799
2882
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
2800
2883
     negative error value.
2804
2887
 
2805
2888
 -- Function: int gnutls_x509_crt_set_subject_key_id (gnutls_x509_crt_t
2806
2889
          CERT, const void * ID, size_t ID_SIZE)
2807
 
     CERT: should contain a gnutls_x509_crt_t structure
 
2890
     CERT: a certificate of type `gnutls_x509_crt_t'
2808
2891
 
2809
2892
     ID: The key ID
2810
2893
 
2821
2904
 
2822
2905
 -- Function: int gnutls_x509_crt_set_version (gnutls_x509_crt_t CRT,
2823
2906
          unsigned int VERSION)
2824
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2907
     CRT: a certificate of type `gnutls_x509_crt_t'
2825
2908
 
2826
2909
     VERSION: holds the version number. For X.509v1 certificates must
2827
2910
     be 1.
2832
2915
 
2833
2916
     To create well-formed certificates, you must specify version 3 if
2834
2917
     you use any certificate extensions.  Extensions are created by
2835
 
     functions such as `gnutls_x509_crt_set_subject_alternative_name()'
2836
 
     or `gnutls_x509_crt_set_key_usage()'.
 
2918
     functions such as `gnutls_x509_crt_set_subject_alt_name()' or
 
2919
     `gnutls_x509_crt_set_key_usage()'.
2837
2920
 
2838
2921
     *Returns:* On success, `GNUTLS_E_SUCCESS' is returned, otherwise a
2839
2922
     negative error value.
2844
2927
 -- Function: int gnutls_x509_crt_sign2 (gnutls_x509_crt_t CRT,
2845
2928
          gnutls_x509_crt_t ISSUER, gnutls_x509_privkey_t ISSUER_KEY,
2846
2929
          gnutls_digest_algorithm_t DIG, unsigned int FLAGS)
2847
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2930
     CRT: a certificate of type `gnutls_x509_crt_t'
2848
2931
 
2849
2932
     ISSUER: is the certificate of the certificate issuer
2850
2933
 
2851
2934
     ISSUER_KEY: holds the issuer's private key
2852
2935
 
2853
 
     DIG: The message digest to use. GNUTLS_DIG_SHA1 is the safe choice
2854
 
     unless you know what you're doing.
 
2936
     DIG: The message digest to use, `GNUTLS_DIG_SHA1' is a safe choice
2855
2937
 
2856
2938
     FLAGS: must be 0
2857
2939
 
2869
2951
 
2870
2952
 -- Function: int gnutls_x509_crt_sign (gnutls_x509_crt_t CRT,
2871
2953
          gnutls_x509_crt_t ISSUER, gnutls_x509_privkey_t ISSUER_KEY)
2872
 
     CRT: should contain a gnutls_x509_crt_t structure
 
2954
     CRT: a certificate of type `gnutls_x509_crt_t'
2873
2955
 
2874
2956
     ISSUER: is the certificate of the certificate issuer
2875
2957
 
3521
3603
9.3 GnuTLS-extra Functions
3522
3604
==========================
3523
3605
 
3524
 
These functions are only available in the GPL version of the library
 
3606
These functions are only available in the GPLv3+ version of the library
3525
3607
called `gnutls-extra'. The prototypes for this library lie in
3526
3608
`gnutls/extra.h'.
3527
3609
 
3555
3637
=====================
3556
3638
 
3557
3639
The following functions are to be used for OpenPGP certificate
3558
 
handling.  Their prototypes lie in `gnutls/openpgp.h'.  You need to
3559
 
link with `libgnutls-extra' to be able to use these functions (*note
3560
 
GnuTLS-extra functions::).
 
3640
handling.  Their prototypes lie in `gnutls/openpgp.h'.
3561
3641
 
3562
3642
gnutls_certificate_set_openpgp_key_file2
3563
3643
----------------------------------------
3564
3644
 
3565
3645
 -- Function: int gnutls_certificate_set_openpgp_key_file2
3566
3646
          (gnutls_certificate_credentials_t RES, const char * CERTFILE,
3567
 
          const char * KEYFILE, const char* SUBKEY_ID,
 
3647
          const char * KEYFILE, const char * SUBKEY_ID,
3568
3648
          gnutls_openpgp_crt_fmt_t FORMAT)
3569
3649
     RES: the destination context to save the data.
3570
3650
 
3614
3694
 
3615
3695
 -- Function: int gnutls_certificate_set_openpgp_key_mem2
3616
3696
          (gnutls_certificate_credentials_t RES, const gnutls_datum_t *
3617
 
          ICERT, const gnutls_datum_t * IKEY, const char* SUBKEY_ID,
 
3697
          ICERT, const gnutls_datum_t * IKEY, const char * SUBKEY_ID,
3618
3698
          gnutls_openpgp_crt_fmt_t FORMAT)
3619
3699
     RES: the destination context to save the data.
3620
3700
 
3764
3844
     Returns the 64-bit keyID of the first valid OpenPGP subkey marked
3765
3845
     for authentication.  If flag is non zero and no authentication
3766
3846
     subkey exists, then a valid subkey will be returned even if it is
3767
 
     not marked for authentication.
 
3847
     not marked for authentication.  Returns the 64-bit keyID of the
 
3848
     first valid OpenPGP subkey marked for authentication.  If flag is
 
3849
     non zero and no authentication subkey exists, then a valid subkey
 
3850
     will be returned even if it is not marked for authentication.
3768
3851
 
3769
3852
     *Returns:* `GNUTLS_E_SUCCESS' on success, or an error code.
3770
3853
 
4484
4567
 
4485
4568
 -- Function: int gnutls_openpgp_privkey_export
4486
4569
          (gnutls_openpgp_privkey_t KEY, gnutls_openpgp_crt_fmt_t
4487
 
          FORMAT, const char* PASSWORD, unsigned int FLAGS, void *
 
4570
          FORMAT, const char * PASSWORD, unsigned int FLAGS, void *
4488
4571
          OUTPUT_DATA, size_t * OUTPUT_DATA_SIZE)
4489
4572
     KEY: Holds the key.
4490
4573
 
4491
4574
     FORMAT: One of gnutls_openpgp_crt_fmt_t elements.
4492
4575
 
4493
4576
     PASSWORD: the password that will be used to encrypt the key.
 
4577
     (unused for now)
4494
4578
 
4495
4579
     FLAGS: zero for future compatibility
4496
4580
 
4740
4824
 
4741
4825
 -- Function: int gnutls_openpgp_privkey_import
4742
4826
          (gnutls_openpgp_privkey_t KEY, const gnutls_datum_t * DATA,
4743
 
          gnutls_openpgp_crt_fmt_t FORMAT, const char * PASS, unsigned
4744
 
          int FLAGS)
 
4827
          gnutls_openpgp_crt_fmt_t FORMAT, const char * PASSWORD,
 
4828
          unsigned int FLAGS)
4745
4829
     KEY: The structure to store the parsed key.
4746
4830
 
4747
4831
     DATA: The RAW or BASE64 encoded key.
4748
4832
 
4749
4833
     FORMAT: One of gnutls_openpgp_crt_fmt_t elements.
4750
4834
 
4751
 
     PASS: Unused for now
 
4835
     PASSWORD: (unused for now)
4752
4836
 
4753
4837
     FLAGS: should be zero
4754
4838
 
5591
5675
10 All the Supported Ciphersuites in GnuTLS
5592
5676
*******************************************
5593
5677
 
5594
 
`TLS_RSA_NULL_MD5'               0x00 0x01      RFC 2246
5595
 
`TLS_ANON_DH_3DES_EDE_CBC_SHA'   0x00 0x1B      RFC 2246
5596
 
`TLS_ANON_DH_ARCFOUR_MD5'        0x00 0x18      RFC 2246
5597
 
`TLS_ANON_DH_AES_128_CBC_SHA'    0x00 0x34      RFC 2246
5598
 
`TLS_ANON_DH_AES_256_CBC_SHA'    0x00 0x3A      RFC 2246
5599
 
`TLS_RSA_ARCFOUR_SHA'            0x00 0x05      RFC 2246
5600
 
`TLS_RSA_ARCFOUR_MD5'            0x00 0x04      RFC 2246
5601
 
`TLS_RSA_3DES_EDE_CBC_SHA'       0x00 0x0A      RFC 2246
5602
 
`TLS_RSA_EXPORT_ARCFOUR_40_MD5'  0x00 0x03      RFC 2246
5603
 
`TLS_DHE_DSS_3DES_EDE_CBC_SHA'   0x00 0x13      RFC 2246
5604
 
`TLS_DHE_RSA_3DES_EDE_CBC_SHA'   0x00 0x16      RFC 2246
5605
 
`TLS_RSA_AES_128_CBC_SHA'        0x00 0x2F      RFC 3268
5606
 
`TLS_RSA_AES_256_CBC_SHA'        0x00 0x35      RFC 3268
5607
 
`TLS_DHE_DSS_AES_256_CBC_SHA'    0x00 0x38      RFC 3268
5608
 
`TLS_DHE_DSS_AES_128_CBC_SHA'    0x00 0x32      RFC 3268
5609
 
`TLS_DHE_RSA_AES_256_CBC_SHA'    0x00 0x39      RFC 3268
5610
 
`TLS_DHE_RSA_AES_128_CBC_SHA'    0x00 0x33      RFC 3268
5611
 
`TLS_SRP_SHA_3DES_EDE_CBC_SHA'   0x00 0x50      RFC 5054
5612
 
`TLS_SRP_SHA_AES_128_CBC_SHA'    0x00 0x53      RFC 5054
5613
 
`TLS_SRP_SHA_AES_256_CBC_SHA'    0x00 0x56      RFC 5054
5614
 
`TLS_SRP_SHA_RSA_3DES_EDE_CBC_SHA'0x00 0x51      RFC 5054
5615
 
`TLS_SRP_SHA_DSS_3DES_EDE_CBC_SHA'0x00 0x52      RFC 5054
5616
 
`TLS_SRP_SHA_RSA_AES_128_CBC_SHA'0x00 0x54      RFC 5054
5617
 
`TLS_SRP_SHA_DSS_AES_128_CBC_SHA'0x00 0x55      RFC 5054
5618
 
`TLS_SRP_SHA_RSA_AES_256_CBC_SHA'0x00 0x57      RFC 5054
5619
 
`TLS_SRP_SHA_DSS_AES_256_CBC_SHA'0x00 0x58      RFC 5054
5620
 
`TLS_DHE_DSS_ARCFOUR_SHA'        0x00 0x66      draft-ietf-tls-56-bit-ciphersuites
5621
 
`TLS_PSK_ARCFOUR_SHA'            0x00 0x8A      draft-ietf-tls-psk
5622
 
`TLS_PSK_3DES_EDE_CBC_SHA'       0x00 0x8B      draft-ietf-tls-psk
5623
 
`TLS_PSK_AES_128_CBC_SHA'        0x00 0x8C      draft-ietf-tls-psk
5624
 
`TLS_PSK_AES_256_CBC_SHA'        0x00 0x8D      draft-ietf-tls-psk
 
5678
Available cipher suites:
 
5679
TLS_ANON_DH_ARCFOUR_MD5                     0x00 0x18      SSL3.0
 
5680
TLS_ANON_DH_3DES_EDE_CBC_SHA1               0x00 0x1b      SSL3.0
 
5681
TLS_ANON_DH_AES_128_CBC_SHA1                0x00 0x34      SSL3.0
 
5682
TLS_ANON_DH_AES_256_CBC_SHA1                0x00 0x3a      SSL3.0
 
5683
TLS_ANON_DH_CAMELLIA_128_CBC_SHA1           0x00 0x46      TLS1.0
 
5684
TLS_ANON_DH_CAMELLIA_256_CBC_SHA1           0x00 0x89      TLS1.0
 
5685
TLS_PSK_SHA_ARCFOUR_SHA1                    0x00 0x8a      TLS1.0
 
5686
TLS_PSK_SHA_3DES_EDE_CBC_SHA1               0x00 0x8b      TLS1.0
 
5687
TLS_PSK_SHA_AES_128_CBC_SHA1                0x00 0x8c      TLS1.0
 
5688
TLS_PSK_SHA_AES_256_CBC_SHA1                0x00 0x8d      TLS1.0
 
5689
TLS_DHE_PSK_SHA_ARCFOUR_SHA1                0x00 0x8e      TLS1.0
 
5690
TLS_DHE_PSK_SHA_3DES_EDE_CBC_SHA1           0x00 0x8f      TLS1.0
 
5691
TLS_DHE_PSK_SHA_AES_128_CBC_SHA1            0x00 0x90      TLS1.0
 
5692
TLS_DHE_PSK_SHA_AES_256_CBC_SHA1            0x00 0x91      TLS1.0
 
5693
TLS_SRP_SHA_3DES_EDE_CBC_SHA1               0xc0 0x1a      TLS1.0
 
5694
TLS_SRP_SHA_AES_128_CBC_SHA1                0xc0 0x1d      TLS1.0
 
5695
TLS_SRP_SHA_AES_256_CBC_SHA1                0xc0 0x20      TLS1.0
 
5696
TLS_SRP_SHA_DSS_3DES_EDE_CBC_SHA1           0xc0 0x1c      TLS1.0
 
5697
TLS_SRP_SHA_RSA_3DES_EDE_CBC_SHA1           0xc0 0x1b      TLS1.0
 
5698
TLS_SRP_SHA_DSS_AES_128_CBC_SHA1            0xc0 0x1f      TLS1.0
 
5699
TLS_SRP_SHA_RSA_AES_128_CBC_SHA1            0xc0 0x1e      TLS1.0
 
5700
TLS_SRP_SHA_DSS_AES_256_CBC_SHA1            0xc0 0x22      TLS1.0
 
5701
TLS_SRP_SHA_RSA_AES_256_CBC_SHA1            0xc0 0x21      TLS1.0
 
5702
TLS_DHE_DSS_ARCFOUR_SHA1                    0x00 0x66      TLS1.0
 
5703
TLS_DHE_DSS_3DES_EDE_CBC_SHA1               0x00 0x13      SSL3.0
 
5704
TLS_DHE_DSS_AES_128_CBC_SHA1                0x00 0x32      SSL3.0
 
5705
TLS_DHE_DSS_AES_256_CBC_SHA1                0x00 0x38      SSL3.0
 
5706
TLS_DHE_DSS_CAMELLIA_128_CBC_SHA1           0x00 0x44      TLS1.0
 
5707
TLS_DHE_DSS_CAMELLIA_256_CBC_SHA1           0x00 0x87      TLS1.0
 
5708
TLS_DHE_RSA_3DES_EDE_CBC_SHA1               0x00 0x16      SSL3.0
 
5709
TLS_DHE_RSA_AES_128_CBC_SHA1                0x00 0x33      SSL3.0
 
5710
TLS_DHE_RSA_AES_256_CBC_SHA1                0x00 0x39      SSL3.0
 
5711
TLS_DHE_RSA_CAMELLIA_128_CBC_SHA1           0x00 0x45      TLS1.0
 
5712
TLS_DHE_RSA_CAMELLIA_256_CBC_SHA1           0x00 0x88      TLS1.0
 
5713
TLS_RSA_NULL_MD5                            0x00 0x01      SSL3.0
 
5714
TLS_RSA_EXPORT_ARCFOUR_40_MD5               0x00 0x03      SSL3.0
 
5715
TLS_RSA_ARCFOUR_SHA1                        0x00 0x05      SSL3.0
 
5716
TLS_RSA_ARCFOUR_MD5                         0x00 0x04      SSL3.0
 
5717
TLS_RSA_3DES_EDE_CBC_SHA1                   0x00 0x0a      SSL3.0
 
5718
TLS_RSA_AES_128_CBC_SHA1                    0x00 0x2f      SSL3.0
 
5719
TLS_RSA_AES_256_CBC_SHA1                    0x00 0x35      SSL3.0
 
5720
TLS_RSA_CAMELLIA_128_CBC_SHA1               0x00 0x41      TLS1.0
 
5721
TLS_RSA_CAMELLIA_256_CBC_SHA1               0x00 0x84      TLS1.0
 
5722
 
 
5723
Available certificate types:
 
5724
   * X.509
 
5725
 
 
5726
   * OPENPGP
 
5727
 
 
5728
Available protocols:
 
5729
   * SSL3.0
 
5730
 
 
5731
   * TLS1.0
 
5732
 
 
5733
   * TLS1.1
 
5734
 
 
5735
   * TLS1.2
 
5736
 
 
5737
Available ciphers:
 
5738
   * AES-256-CBC
 
5739
 
 
5740
   * AES-128-CBC
 
5741
 
 
5742
   * 3DES-CBC
 
5743
 
 
5744
   * DES-CBC
 
5745
 
 
5746
   * ARCFOUR-128
 
5747
 
 
5748
   * ARCFOUR-40
 
5749
 
 
5750
   * RC2-40
 
5751
 
 
5752
   * CAMELLIA-256-CBC
 
5753
 
 
5754
   * CAMELLIA-128-CBC
 
5755
 
 
5756
   * NULL
 
5757
 
 
5758
Available MAC algorithms:
 
5759
   * SHA1
 
5760
 
 
5761
   * MD5
 
5762
 
 
5763
   * SHA256
 
5764
 
 
5765
   * SHA384
 
5766
 
 
5767
   * SHA512
 
5768
 
 
5769
   * MD2
 
5770
 
 
5771
   * RIPEMD160
 
5772
 
 
5773
   * NULL
 
5774
 
 
5775
Available key exchange methods:
 
5776
   * ANON-DH
 
5777
 
 
5778
   * RSA
 
5779
 
 
5780
   * RSA-EXPORT
 
5781
 
 
5782
   * DHE-RSA
 
5783
 
 
5784
   * DHE-DSS
 
5785
 
 
5786
   * SRP-DSS
 
5787
 
 
5788
   * SRP-RSA
 
5789
 
 
5790
   * SRP
 
5791
 
 
5792
   * PSK
 
5793
 
 
5794
   * DHE-PSK
 
5795
 
 
5796
Available public key algorithms:
 
5797
   * RSA
 
5798
 
 
5799
   * DSA
 
5800
 
 
5801
Available public key signature algorithms:
 
5802
   * RSA-SHA
 
5803
 
 
5804
   * RSA-SHA256
 
5805
 
 
5806
   * RSA-SHA384
 
5807
 
 
5808
   * RSA-SHA512
 
5809
 
 
5810
   * RSA-RMD160
 
5811
 
 
5812
   * DSA-SHA
 
5813
 
 
5814
   * RSA-MD5
 
5815
 
 
5816
   * RSA-MD2
 
5817
 
 
5818
Available compression methods:
 
5819
   * DEFLATE
 
5820
 
 
5821
   * NULL
 
5822
 
 
5823
Some additional information regarding some of the algorithms:
 
5824
 
 
5825
`RSA'
 
5826
     RSA is public key cryptosystem designed by Ronald Rivest, Adi
 
5827
     Shamir and Leonard Adleman.  It can be used with any hash
 
5828
     functions.
 
5829
 
 
5830
`DSA'
 
5831
     DSA is the USA's Digital Signature Standard.  It uses only the
 
5832
     SHA-1 hash algorithm.
 
5833
 
 
5834
`MD2'
 
5835
     MD2 is a cryptographic hash algorithm designed by Ron Rivest.  It
 
5836
     is optimized for 8-bit processors. Outputs 128 bits of data.
 
5837
     There are no known weaknesses of this algorithm but since this
 
5838
     algorithm is rarely used and not really studied it should not be
 
5839
     used today.
 
5840
 
 
5841
`MD5'
 
5842
     MD5 is a cryptographic hash algorithm designed by Ron Rivest.
 
5843
     Outputs 128 bits of data.  It is considered to be broken.
 
5844
 
 
5845
`SHA-1'
 
5846
     SHA is a cryptographic hash algorithm designed by NSA. Outputs 160
 
5847
     bits of data.  It is also considered to be broken, though no
 
5848
     practical attacks have been found.
 
5849
 
 
5850
`RMD160'
 
5851
     RIPEMD is a cryptographic hash algorithm developed in the
 
5852
     framework of the EU project RIPE.  Outputs 160 bits of data.
 
5853
 
5625
5854
 
5626
5855
 
5627
5856
File: gnutls.info,  Node: Guile Bindings,  Next: Internal architecture of GnuTLS,  Prev: All the supported ciphersuites in GnuTLS,  Up: Top
6691
6920
The focus is to give an idea to potential developers and those who want
6692
6921
to know what happens inside the black box.
6693
6922
 
 
6923
* Menu:
 
6924
 
 
6925
* The TLS Protocol::
 
6926
* TLS Handshake Protocol::
 
6927
* TLS Authentication Methods::
 
6928
* TLS Extension Handling::
 
6929
* Cryptographic Backend::
 
6930
 
 
6931
 
 
6932
File: gnutls.info,  Node: The TLS Protocol,  Next: TLS Handshake Protocol,  Up: Internal architecture of GnuTLS
 
6933
 
6694
6934
12.1 The TLS Protocol
6695
6935
=====================
6696
6936
 
6704
6944
attributes. The operations listed are functions that require the first
6705
6945
parameter to be that object.  [image src="gnutls-objects.png"]
6706
6946
 
 
6947
 
 
6948
File: gnutls.info,  Node: TLS Handshake Protocol,  Next: TLS Authentication Methods,  Prev: The TLS Protocol,  Up: Internal architecture of GnuTLS
 
6949
 
6707
6950
12.2 TLS Handshake Protocol
6708
6951
===========================
6709
6952
 
6722
6965
 
6723
6966
[image src="gnutls-handshake-sequence.png"]
6724
6967
 
 
6968
 
 
6969
File: gnutls.info,  Node: TLS Authentication Methods,  Next: TLS Extension Handling,  Prev: TLS Handshake Protocol,  Up: Internal architecture of GnuTLS
 
6970
 
6725
6971
12.3 TLS Authentication Methods
6726
6972
===============================
6727
6973
 
6745
6991
its pointers has to be registered in `gnutls_algorithms.c' in the
6746
6992
`_gnutls_kx_algorithms' structure.
6747
6993
 
 
6994
---------- Footnotes ----------
 
6995
 
 
6996
(1) such as the `gnutls_certificate_credentials_t' structures
 
6997
 
 
6998
 
 
6999
File: gnutls.info,  Node: TLS Extension Handling,  Next: Cryptographic Backend,  Prev: TLS Authentication Methods,  Up: Internal architecture of GnuTLS
 
7000
 
6748
7001
12.4 TLS Extension Handling
6749
7002
===========================
6750
7003
 
6903
7156
 
6904
7157
     The APIs need to be added to `includes/gnutls/gnutls.h' or
6905
7158
     `includes/gnutls/extra.h' as appropriate.  It is recommended that
6906
 
     if you don't have a requirement to use the LGPL license for your
6907
 
     extension, that you place your work under the GPL license and thus
6908
 
     in the libgnutls-extra library.
 
7159
     if you don't have a requirement to use the LGPLv2.1+ license for
 
7160
     your extension, that you place your work under the GPLv3+ license
 
7161
     and thus in the libgnutls-extra library.
6909
7162
 
6910
7163
     You can implement the API function in the `ext_foobar.c' file, or
6911
7164
     if that file ends up becoming rather larger, add a
6920
7173
 
6921
7174
[image src="gnutls-certificate-user-use-case.png"]
6922
7175
 
6923
 
---------- Footnotes ----------
6924
 
 
6925
 
(1) such as the `gnutls_certificate_credentials_t' structures
 
7176
 
 
7177
File: gnutls.info,  Node: Cryptographic Backend,  Prev: TLS Extension Handling,  Up: Internal architecture of GnuTLS
 
7178
 
 
7179
12.6 Cryptographic Backend
 
7180
==========================
 
7181
 
 
7182
Several new systems provide hardware assisted cryptographic algorithm
 
7183
implementations that offer implementations some orders of magnitude
 
7184
faster than the software. For this reason in current releases of GnuTLS
 
7185
it is possible to override parts of the crypto backend or the whole. It
 
7186
is possible to override them both at runtime and compile time, however
 
7187
here we will discuss the runtime possibility. The API available for
 
7188
this functionality is in `gnutls/crypto.h' header file.
 
7189
 
 
7190
12.6.1 Override specific algorithms
 
7191
-----------------------------------
 
7192
 
 
7193
When an optimized implementation of a single algorithm is available,
 
7194
say a hardware assisted version of AES-CBC then the following functions
 
7195
can be used to register those algorithms.
 
7196
 
 
7197
   * *note gnutls_crypto_single_cipher_register2:: To register a cipher
 
7198
     algorithm.
 
7199
 
 
7200
   * *note gnutls_crypto_single_mac_register2:: To register a MAC
 
7201
     algorithm.
 
7202
 
 
7203
     *note gnutls_crypto_single_digest_register2:: To register a digest
 
7204
     (hash) algorithm.
 
7205
 
 
7206
 
 
7207
Those registration functions will only replace the specified algorithm
 
7208
and leave the rest of subsystem intact.
 
7209
 
 
7210
12.6.2 Override parts of the backend
 
7211
------------------------------------
 
7212
 
 
7213
In some systems, such as embedded ones, it might be desirable to
 
7214
override big parts of the cryptographic backend, or even all of them.
 
7215
For this reason the following functions are provided.
 
7216
 
 
7217
   * *note gnutls_crypto_cipher_register2:: To override the
 
7218
     cryptographic algorithms backend.
 
7219
 
 
7220
   * *note gnutls_crypto_mac_register2:: To override the MAC algorithms
 
7221
     backend.
 
7222
 
 
7223
   * *note gnutls_crypto_digest_register2:: To override the digest
 
7224
     algorithms backend.
 
7225
 
 
7226
   * *note gnutls_crypto_rnd_register2:: To override the random number
 
7227
     generator backend.
 
7228
 
 
7229
   * *note gnutls_crypto_bigint_register2:: To override the big number
 
7230
     number operations backend.
 
7231
 
 
7232
   * *note gnutls_crypto_pk_register2:: To override the public key
 
7233
     encryption backend. This is tight to the big number operations so
 
7234
     either both of them should be updated or care must be taken to use
 
7235
     the same format.
 
7236
 
 
7237
 
 
7238
If all of them are used then GnuTLS will no longer use libgcrypt.
6926
7239
 
6927
7240
 
6928
7241
File: gnutls.info,  Node: Copying Information,  Next: Concept Index,  Prev: Internal architecture of GnuTLS,  Up: Top
7368
7681
free software license, such as the GNU General Public License, to
7369
7682
permit their use in free software.
7370
7683
 
7371
 
 
7372
 
File: gnutls.info,  Node: GNU LGPL,  Next: GNU GPL,  Prev: GNU Free Documentation License,  Up: Copying Information
7373
 
 
7374
 
A.2 GNU Lesser General Public License
7375
 
=====================================
7376
 
 
7377
 
                      Version 2.1, February 1999
7378
 
 
7379
 
     Copyright (C) 1991, 1999 Free Software Foundation, Inc.
7380
 
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7381
 
 
7382
 
     Everyone is permitted to copy and distribute verbatim copies
7383
 
     of this license document, but changing it is not allowed.
7384
 
 
7385
 
     [This is the first released version of the Lesser GPL.  It also counts
7386
 
     as the successor of the GNU Library Public License, version 2, hence the
7387
 
     version number 2.1.]
7388
 
 
7389
 
Preamble
7390
 
--------
7391
 
 
7392
 
The licenses for most software are designed to take away your freedom
7393
 
to share and change it.  By contrast, the GNU General Public Licenses
7394
 
are intended to guarantee your freedom to share and change free
7395
 
software--to make sure the software is free for all its users.
7396
 
 
7397
 
This license, the Lesser General Public License, applies to some
7398
 
specially designated software--typically libraries--of the Free
7399
 
Software Foundation and other authors who decide to use it.  You can use
7400
 
it too, but we suggest you first think carefully about whether this
7401
 
license or the ordinary General Public License is the better strategy to
7402
 
use in any particular case, based on the explanations below.
7403
 
 
7404
 
When we speak of free software, we are referring to freedom of use, not
7405
 
price.  Our General Public Licenses are designed to make sure that you
7406
 
have the freedom to distribute copies of free software (and charge for
7407
 
this service if you wish); that you receive source code or can get it
7408
 
if you want it; that you can change the software and use pieces of it
7409
 
in new free programs; and that you are informed that you can do these
7410
 
things.
7411
 
 
7412
 
To protect your rights, we need to make restrictions that forbid
7413
 
distributors to deny you these rights or to ask you to surrender these
7414
 
rights.  These restrictions translate to certain responsibilities for
7415
 
you if you distribute copies of the library or if you modify it.
7416
 
 
7417
 
For example, if you distribute copies of the library, whether gratis or
7418
 
for a fee, you must give the recipients all the rights that we gave
7419
 
you.  You must make sure that they, too, receive or can get the source
7420
 
code.  If you link other code with the library, you must provide
7421
 
complete object files to the recipients, so that they can relink them
7422
 
with the library after making changes to the library and recompiling
7423
 
it.  And you must show them these terms so they know their rights.
7424
 
 
7425
 
We protect your rights with a two-step method: (1) we copyright the
7426
 
library, and (2) we offer you this license, which gives you legal
7427
 
permission to copy, distribute and/or modify the library.
7428
 
 
7429
 
To protect each distributor, we want to make it very clear that there
7430
 
is no warranty for the free library.  Also, if the library is modified
7431
 
by someone else and passed on, the recipients should know that what
7432
 
they have is not the original version, so that the original author's
7433
 
reputation will not be affected by problems that might be introduced by
7434
 
others.
7435
 
 
7436
 
Finally, software patents pose a constant threat to the existence of
7437
 
any free program.  We wish to make sure that a company cannot
7438
 
effectively restrict the users of a free program by obtaining a
7439
 
restrictive license from a patent holder.  Therefore, we insist that
7440
 
any patent license obtained for a version of the library must be
7441
 
consistent with the full freedom of use specified in this license.
7442
 
 
7443
 
Most GNU software, including some libraries, is covered by the ordinary
7444
 
GNU General Public License.  This license, the GNU Lesser General
7445
 
Public License, applies to certain designated libraries, and is quite
7446
 
different from the ordinary General Public License.  We use this
7447
 
license for certain libraries in order to permit linking those
7448
 
libraries into non-free programs.
7449
 
 
7450
 
When a program is linked with a library, whether statically or using a
7451
 
shared library, the combination of the two is legally speaking a
7452
 
combined work, a derivative of the original library.  The ordinary
7453
 
General Public License therefore permits such linking only if the
7454
 
entire combination fits its criteria of freedom.  The Lesser General
7455
 
Public License permits more lax criteria for linking other code with
7456
 
the library.
7457
 
 
7458
 
We call this license the "Lesser" General Public License because it
7459
 
does _Less_ to protect the user's freedom than the ordinary General
7460
 
Public License.  It also provides other free software developers Less
7461
 
of an advantage over competing non-free programs.  These disadvantages
7462
 
are the reason we use the ordinary General Public License for many
7463
 
libraries.  However, the Lesser license provides advantages in certain
7464
 
special circumstances.
7465
 
 
7466
 
For example, on rare occasions, there may be a special need to
7467
 
encourage the widest possible use of a certain library, so that it
7468
 
becomes a de-facto standard.  To achieve this, non-free programs must be
7469
 
allowed to use the library.  A more frequent case is that a free
7470
 
library does the same job as widely used non-free libraries.  In this
7471
 
case, there is little to gain by limiting the free library to free
7472
 
software only, so we use the Lesser General Public License.
7473
 
 
7474
 
In other cases, permission to use a particular library in non-free
7475
 
programs enables a greater number of people to use a large body of free
7476
 
software.  For example, permission to use the GNU C Library in non-free
7477
 
programs enables many more people to use the whole GNU operating
7478
 
system, as well as its variant, the GNU/Linux operating system.
7479
 
 
7480
 
Although the Lesser General Public License is Less protective of the
7481
 
users' freedom, it does ensure that the user of a program that is
7482
 
linked with the Library has the freedom and the wherewithal to run that
7483
 
program using a modified version of the Library.
7484
 
 
7485
 
The precise terms and conditions for copying, distribution and
7486
 
modification follow.  Pay close attention to the difference between a
7487
 
"work based on the library" and a "work that uses the library".  The
7488
 
former contains code derived from the library, whereas the latter must
7489
 
be combined with the library in order to run.
7490
 
 
7491
 
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7492
 
---------------------------------------------------------------
7493
 
 
7494
 
  0. This License Agreement applies to any software library or other
7495
 
     program which contains a notice placed by the copyright holder or
7496
 
     other authorized party saying it may be distributed under the
7497
 
     terms of this Lesser General Public License (also called "this
7498
 
     License").  Each licensee is addressed as "you".
7499
 
 
7500
 
     A "library" means a collection of software functions and/or data
7501
 
     prepared so as to be conveniently linked with application programs
7502
 
     (which use some of those functions and data) to form executables.
7503
 
 
7504
 
     The "Library", below, refers to any such software library or work
7505
 
     which has been distributed under these terms.  A "work based on the
7506
 
     Library" means either the Library or any derivative work under
7507
 
     copyright law: that is to say, a work containing the Library or a
7508
 
     portion of it, either verbatim or with modifications and/or
7509
 
     translated straightforwardly into another language.  (Hereinafter,
7510
 
     translation is included without limitation in the term
7511
 
     "modification".)
7512
 
 
7513
 
     "Source code" for a work means the preferred form of the work for
7514
 
     making modifications to it.  For a library, complete source code
7515
 
     means all the source code for all modules it contains, plus any
7516
 
     associated interface definition files, plus the scripts used to
7517
 
     control compilation and installation of the library.
7518
 
 
7519
 
     Activities other than copying, distribution and modification are
7520
 
     not covered by this License; they are outside its scope.  The act
7521
 
     of running a program using the Library is not restricted, and
7522
 
     output from such a program is covered only if its contents
7523
 
     constitute a work based on the Library (independent of the use of
7524
 
     the Library in a tool for writing it).  Whether that is true
7525
 
     depends on what the Library does and what the program that uses
7526
 
     the Library does.
7527
 
 
7528
 
  1. You may copy and distribute verbatim copies of the Library's
7529
 
     complete source code as you receive it, in any medium, provided
7530
 
     that you conspicuously and appropriately publish on each copy an
7531
 
     appropriate copyright notice and disclaimer of warranty; keep
7532
 
     intact all the notices that refer to this License and to the
7533
 
     absence of any warranty; and distribute a copy of this License
7534
 
     along with the Library.
7535
 
 
7536
 
     You may charge a fee for the physical act of transferring a copy,
7537
 
     and you may at your option offer warranty protection in exchange
7538
 
     for a fee.
7539
 
 
7540
 
  2. You may modify your copy or copies of the Library or any portion
7541
 
     of it, thus forming a work based on the Library, and copy and
7542
 
     distribute such modifications or work under the terms of Section 1
7543
 
     above, provided that you also meet all of these conditions:
7544
 
 
7545
 
       a. The modified work must itself be a software library.
7546
 
 
7547
 
       b. You must cause the files modified to carry prominent notices
7548
 
          stating that you changed the files and the date of any change.
7549
 
 
7550
 
       c. You must cause the whole of the work to be licensed at no
7551
 
          charge to all third parties under the terms of this License.
7552
 
 
7553
 
       d. If a facility in the modified Library refers to a function or
7554
 
          a table of data to be supplied by an application program that
7555
 
          uses the facility, other than as an argument passed when the
7556
 
          facility is invoked, then you must make a good faith effort
7557
 
          to ensure that, in the event an application does not supply
7558
 
          such function or table, the facility still operates, and
7559
 
          performs whatever part of its purpose remains meaningful.
7560
 
 
7561
 
          (For example, a function in a library to compute square roots
7562
 
          has a purpose that is entirely well-defined independent of the
7563
 
          application.  Therefore, Subsection 2d requires that any
7564
 
          application-supplied function or table used by this function
7565
 
          must be optional: if the application does not supply it, the
7566
 
          square root function must still compute square roots.)
7567
 
 
7568
 
     These requirements apply to the modified work as a whole.  If
7569
 
     identifiable sections of that work are not derived from the
7570
 
     Library, and can be reasonably considered independent and separate
7571
 
     works in themselves, then this License, and its terms, do not
7572
 
     apply to those sections when you distribute them as separate
7573
 
     works.  But when you distribute the same sections as part of a
7574
 
     whole which is a work based on the Library, the distribution of
7575
 
     the whole must be on the terms of this License, whose permissions
7576
 
     for other licensees extend to the entire whole, and thus to each
7577
 
     and every part regardless of who wrote it.
7578
 
 
7579
 
     Thus, it is not the intent of this section to claim rights or
7580
 
     contest your rights to work written entirely by you; rather, the
7581
 
     intent is to exercise the right to control the distribution of
7582
 
     derivative or collective works based on the Library.
7583
 
 
7584
 
     In addition, mere aggregation of another work not based on the
7585
 
     Library with the Library (or with a work based on the Library) on
7586
 
     a volume of a storage or distribution medium does not bring the
7587
 
     other work under the scope of this License.
7588
 
 
7589
 
  3. You may opt to apply the terms of the ordinary GNU General Public
7590
 
     License instead of this License to a given copy of the Library.
7591
 
     To do this, you must alter all the notices that refer to this
7592
 
     License, so that they refer to the ordinary GNU General Public
7593
 
     License, version 2, instead of to this License.  (If a newer
7594
 
     version than version 2 of the ordinary GNU General Public License
7595
 
     has appeared, then you can specify that version instead if you
7596
 
     wish.)  Do not make any other change in these notices.
7597
 
 
7598
 
     Once this change is made in a given copy, it is irreversible for
7599
 
     that copy, so the ordinary GNU General Public License applies to
7600
 
     all subsequent copies and derivative works made from that copy.
7601
 
 
7602
 
     This option is useful when you wish to copy part of the code of
7603
 
     the Library into a program that is not a library.
7604
 
 
7605
 
  4. You may copy and distribute the Library (or a portion or
7606
 
     derivative of it, under Section 2) in object code or executable
7607
 
     form under the terms of Sections 1 and 2 above provided that you
7608
 
     accompany it with the complete corresponding machine-readable
7609
 
     source code, which must be distributed under the terms of Sections
7610
 
     1 and 2 above on a medium customarily used for software
7611
 
     interchange.
7612
 
 
7613
 
     If distribution of object code is made by offering access to copy
7614
 
     from a designated place, then offering equivalent access to copy
7615
 
     the source code from the same place satisfies the requirement to
7616
 
     distribute the source code, even though third parties are not
7617
 
     compelled to copy the source along with the object code.
7618
 
 
7619
 
  5. A program that contains no derivative of any portion of the
7620
 
     Library, but is designed to work with the Library by being
7621
 
     compiled or linked with it, is called a "work that uses the
7622
 
     Library".  Such a work, in isolation, is not a derivative work of
7623
 
     the Library, and therefore falls outside the scope of this License.
7624
 
 
7625
 
     However, linking a "work that uses the Library" with the Library
7626
 
     creates an executable that is a derivative of the Library (because
7627
 
     it contains portions of the Library), rather than a "work that
7628
 
     uses the library".  The executable is therefore covered by this
7629
 
     License.  Section 6 states terms for distribution of such
7630
 
     executables.
7631
 
 
7632
 
     When a "work that uses the Library" uses material from a header
7633
 
     file that is part of the Library, the object code for the work may
7634
 
     be a derivative work of the Library even though the source code is
7635
 
     not.  Whether this is true is especially significant if the work
7636
 
     can be linked without the Library, or if the work is itself a
7637
 
     library.  The threshold for this to be true is not precisely
7638
 
     defined by law.
7639
 
 
7640
 
     If such an object file uses only numerical parameters, data
7641
 
     structure layouts and accessors, and small macros and small inline
7642
 
     functions (ten lines or less in length), then the use of the object
7643
 
     file is unrestricted, regardless of whether it is legally a
7644
 
     derivative work.  (Executables containing this object code plus
7645
 
     portions of the Library will still fall under Section 6.)
7646
 
 
7647
 
     Otherwise, if the work is a derivative of the Library, you may
7648
 
     distribute the object code for the work under the terms of Section
7649
 
     6.  Any executables containing that work also fall under Section 6,
7650
 
     whether or not they are linked directly with the Library itself.
7651
 
 
7652
 
  6. As an exception to the Sections above, you may also combine or
7653
 
     link a "work that uses the Library" with the Library to produce a
7654
 
     work containing portions of the Library, and distribute that work
7655
 
     under terms of your choice, provided that the terms permit
7656
 
     modification of the work for the customer's own use and reverse
7657
 
     engineering for debugging such modifications.
7658
 
 
7659
 
     You must give prominent notice with each copy of the work that the
7660
 
     Library is used in it and that the Library and its use are covered
7661
 
     by this License.  You must supply a copy of this License.  If the
7662
 
     work during execution displays copyright notices, you must include
7663
 
     the copyright notice for the Library among them, as well as a
7664
 
     reference directing the user to the copy of this License.  Also,
7665
 
     you must do one of these things:
7666
 
 
7667
 
       a. Accompany the work with the complete corresponding
7668
 
          machine-readable source code for the Library including
7669
 
          whatever changes were used in the work (which must be
7670
 
          distributed under Sections 1 and 2 above); and, if the work
7671
 
          is an executable linked with the Library, with the complete
7672
 
          machine-readable "work that uses the Library", as object code
7673
 
          and/or source code, so that the user can modify the Library
7674
 
          and then relink to produce a modified executable containing
7675
 
          the modified Library.  (It is understood that the user who
7676
 
          changes the contents of definitions files in the Library will
7677
 
          not necessarily be able to recompile the application to use
7678
 
          the modified definitions.)
7679
 
 
7680
 
       b. Use a suitable shared library mechanism for linking with the
7681
 
          Library.  A suitable mechanism is one that (1) uses at run
7682
 
          time a copy of the library already present on the user's
7683
 
          computer system, rather than copying library functions into
7684
 
          the executable, and (2) will operate properly with a modified
7685
 
          version of the library, if the user installs one, as long as
7686
 
          the modified version is interface-compatible with the version
7687
 
          that the work was made with.
7688
 
 
7689
 
       c. Accompany the work with a written offer, valid for at least
7690
 
          three years, to give the same user the materials specified in
7691
 
          Subsection 6a, above, for a charge no more than the cost of
7692
 
          performing this distribution.
7693
 
 
7694
 
       d. If distribution of the work is made by offering access to copy
7695
 
          from a designated place, offer equivalent access to copy the
7696
 
          above specified materials from the same place.
7697
 
 
7698
 
       e. Verify that the user has already received a copy of these
7699
 
          materials or that you have already sent this user a copy.
7700
 
 
7701
 
     For an executable, the required form of the "work that uses the
7702
 
     Library" must include any data and utility programs needed for
7703
 
     reproducing the executable from it.  However, as a special
7704
 
     exception, the materials to be distributed need not include
7705
 
     anything that is normally distributed (in either source or binary
7706
 
     form) with the major components (compiler, kernel, and so on) of
7707
 
     the operating system on which the executable runs, unless that
7708
 
     component itself accompanies the executable.
7709
 
 
7710
 
     It may happen that this requirement contradicts the license
7711
 
     restrictions of other proprietary libraries that do not normally
7712
 
     accompany the operating system.  Such a contradiction means you
7713
 
     cannot use both them and the Library together in an executable
7714
 
     that you distribute.
7715
 
 
7716
 
  7. You may place library facilities that are a work based on the
7717
 
     Library side-by-side in a single library together with other
7718
 
     library facilities not covered by this License, and distribute
7719
 
     such a combined library, provided that the separate distribution
7720
 
     of the work based on the Library and of the other library
7721
 
     facilities is otherwise permitted, and provided that you do these
7722
 
     two things:
7723
 
 
7724
 
       a. Accompany the combined library with a copy of the same work
7725
 
          based on the Library, uncombined with any other library
7726
 
          facilities.  This must be distributed under the terms of the
7727
 
          Sections above.
7728
 
 
7729
 
       b. Give prominent notice with the combined library of the fact
7730
 
          that part of it is a work based on the Library, and explaining
7731
 
          where to find the accompanying uncombined form of the same
7732
 
          work.
7733
 
 
7734
 
  8. You may not copy, modify, sublicense, link with, or distribute the
7735
 
     Library except as expressly provided under this License.  Any
7736
 
     attempt otherwise to copy, modify, sublicense, link with, or
7737
 
     distribute the Library is void, and will automatically terminate
7738
 
     your rights under this License.  However, parties who have
7739
 
     received copies, or rights, from you under this License will not
7740
 
     have their licenses terminated so long as such parties remain in
7741
 
     full compliance.
7742
 
 
7743
 
  9. You are not required to accept this License, since you have not
7744
 
     signed it.  However, nothing else grants you permission to modify
7745
 
     or distribute the Library or its derivative works.  These actions
7746
 
     are prohibited by law if you do not accept this License.
7747
 
     Therefore, by modifying or distributing the Library (or any work
7748
 
     based on the Library), you indicate your acceptance of this
7749
 
     License to do so, and all its terms and conditions for copying,
7750
 
     distributing or modifying the Library or works based on it.
7751
 
 
7752
 
 10. Each time you redistribute the Library (or any work based on the
7753
 
     Library), the recipient automatically receives a license from the
7754
 
     original licensor to copy, distribute, link with or modify the
7755
 
     Library subject to these terms and conditions.  You may not impose
7756
 
     any further restrictions on the recipients' exercise of the rights
7757
 
     granted herein.  You are not responsible for enforcing compliance
7758
 
     by third parties with this License.
7759
 
 
7760
 
 11. If, as a consequence of a court judgment or allegation of patent
7761
 
     infringement or for any other reason (not limited to patent
7762
 
     issues), conditions are imposed on you (whether by court order,
7763
 
     agreement or otherwise) that contradict the conditions of this
7764
 
     License, they do not excuse you from the conditions of this
7765
 
     License.  If you cannot distribute so as to satisfy simultaneously
7766
 
     your obligations under this License and any other pertinent
7767
 
     obligations, then as a consequence you may not distribute the
7768
 
     Library at all.  For example, if a patent license would not permit
7769
 
     royalty-free redistribution of the Library by all those who
7770
 
     receive copies directly or indirectly through you, then the only
7771
 
     way you could satisfy both it and this License would be to refrain
7772
 
     entirely from distribution of the Library.
7773
 
 
7774
 
     If any portion of this section is held invalid or unenforceable
7775
 
     under any particular circumstance, the balance of the section is
7776
 
     intended to apply, and the section as a whole is intended to apply
7777
 
     in other circumstances.
7778
 
 
7779
 
     It is not the purpose of this section to induce you to infringe any
7780
 
     patents or other property right claims or to contest validity of
7781
 
     any such claims; this section has the sole purpose of protecting
7782
 
     the integrity of the free software distribution system which is
7783
 
     implemented by public license practices.  Many people have made
7784
 
     generous contributions to the wide range of software distributed
7785
 
     through that system in reliance on consistent application of that
7786
 
     system; it is up to the author/donor to decide if he or she is
7787
 
     willing to distribute software through any other system and a
7788
 
     licensee cannot impose that choice.
7789
 
 
7790
 
     This section is intended to make thoroughly clear what is believed
7791
 
     to be a consequence of the rest of this License.
7792
 
 
7793
 
 12. If the distribution and/or use of the Library is restricted in
7794
 
     certain countries either by patents or by copyrighted interfaces,
7795
 
     the original copyright holder who places the Library under this
7796
 
     License may add an explicit geographical distribution limitation
7797
 
     excluding those countries, so that distribution is permitted only
7798
 
     in or among countries not thus excluded.  In such case, this
7799
 
     License incorporates the limitation as if written in the body of
7800
 
     this License.
7801
 
 
7802
 
 13. The Free Software Foundation may publish revised and/or new
7803
 
     versions of the Lesser General Public License from time to time.
7804
 
     Such new versions will be similar in spirit to the present version,
7805
 
     but may differ in detail to address new problems or concerns.
7806
 
 
7807
 
     Each version is given a distinguishing version number.  If the
7808
 
     Library specifies a version number of this License which applies
7809
 
     to it and "any later version", you have the option of following
7810
 
     the terms and conditions either of that version or of any later
7811
 
     version published by the Free Software Foundation.  If the Library
7812
 
     does not specify a license version number, you may choose any
7813
 
     version ever published by the Free Software Foundation.
7814
 
 
7815
 
 14. If you wish to incorporate parts of the Library into other free
7816
 
     programs whose distribution conditions are incompatible with these,
7817
 
     write to the author to ask for permission.  For software which is
7818
 
     copyrighted by the Free Software Foundation, write to the Free
7819
 
     Software Foundation; we sometimes make exceptions for this.  Our
7820
 
     decision will be guided by the two goals of preserving the free
7821
 
     status of all derivatives of our free software and of promoting
7822
 
     the sharing and reuse of software generally.
7823
 
 
7824
 
                                NO WARRANTY
7825
 
 
7826
 
 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
7827
 
     WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
7828
 
     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
7829
 
     HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT
7830
 
     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
7831
 
     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
7832
 
     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
7833
 
     QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.  SHOULD THE
7834
 
     LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
7835
 
     SERVICING, REPAIR OR CORRECTION.
7836
 
 
7837
 
 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
7838
 
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
7839
 
     MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
7840
 
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
7841
 
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
7842
 
     INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
7843
 
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
7844
 
     OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY
7845
 
     OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
7846
 
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7847
 
 
7848
 
                      END OF TERMS AND CONDITIONS
7849
 
 
7850
 
How to Apply These Terms to Your New Libraries
7851
 
----------------------------------------------
7852
 
 
7853
 
If you develop a new library, and you want it to be of the greatest
7854
 
possible use to the public, we recommend making it free software that
7855
 
everyone can redistribute and change.  You can do so by permitting
7856
 
redistribution under these terms (or, alternatively, under the terms of
7857
 
the ordinary General Public License).
7858
 
 
7859
 
To apply these terms, attach the following notices to the library.  It
7860
 
is safest to attach them to the start of each source file to most
7861
 
effectively convey the exclusion of warranty; and each file should have
7862
 
at least the "copyright" line and a pointer to where the full notice is
7863
 
found.
7864
 
 
7865
 
     ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
7866
 
     Copyright (C) YEAR  NAME OF AUTHOR
7867
 
 
7868
 
     This library is free software; you can redistribute it and/or modify it
7869
 
     under the terms of the GNU Lesser General Public License as published by
7870
 
     the Free Software Foundation; either version 2.1 of the License, or (at
7871
 
     your option) any later version.
7872
 
 
7873
 
     This library is distributed in the hope that it will be useful, but
7874
 
     WITHOUT ANY WARRANTY; without even the implied warranty of
7875
 
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7876
 
     Lesser General Public License for more details.
7877
 
 
7878
 
     You should have received a copy of the GNU Lesser General Public
7879
 
     License along with this library; if not, write to the Free Software
7880
 
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
7881
 
     USA.
7882
 
 
7883
 
Also add information on how to contact you by electronic and paper mail.
7884
 
 
7885
 
You should also get your employer (if you work as a programmer) or your
7886
 
school, if any, to sign a "copyright disclaimer" for the library, if
7887
 
necessary.  Here is a sample; alter the names:
7888
 
 
7889
 
     Yoyodyne, Inc., hereby disclaims all copyright interest in the library
7890
 
     `Frob' (a library for tweaking knobs) written by James Random Hacker.
7891
 
 
7892
 
     SIGNATURE OF TY COON, 1 April 1990
7893
 
     Ty Coon, President of Vice
7894
 
 
7895
 
That's all there is to it!
7896