static PRUint8 des_cbc_known_ciphertext[]  = {
static const PRUint8 des_cbc_known_ciphertext[]  = {
pk11_fips_DES_PowerUpSelfTest( void ){    /* DES Known Key (56-bits). */    static PRUint8 des_known_key[] = { "ANSI DES" };    /* DES-CBC Known Initialization Vector (64-bits). */    static PRUint8 des_cbc_known_initialization_vector[] = { "Security" };    /* DES Known Plaintext (64-bits). */    static PRUint8 des_ecb_known_plaintext[] = { "Netscape" };    static PRUint8 des_cbc_known_plaintext[] = { "Netscape" };    /* DES Known Ciphertext (64-bits). */    static PRUint8 des_ecb_known_ciphertext[] = {			       0x26,0x14,0xe9,0xc3,0x28,0x80,0x50,0xb0};    static PRUint8 des_cbc_known_ciphertext[]  = {			       0x5e,0x95,0x94,0x5d,0x76,0xa2,0xd3,0x7d};    /* DES variables. */    PRUint8        des_computed_ciphertext[FIPS_DES_ENCRYPT_LENGTH];    PRUint8        des_computed_plaintext[FIPS_DES_DECRYPT_LENGTH];    DESContext *   des_context;    unsigned int   des_bytes_encrypted;    unsigned int   des_bytes_decrypted;    SECStatus      des_status;    /******************************************************/    /* DES-ECB Single-Round Known Answer Encryption Test: */    /******************************************************/    des_context = DES_CreateContext( des_known_key, NULL, NSS_DES, PR_TRUE );    if( des_context == NULL )        return( CKR_HOST_MEMORY );    des_status = DES_Encrypt( des_context, des_computed_ciphertext,                              &des_bytes_encrypted, FIPS_DES_ENCRYPT_LENGTH,                              des_ecb_known_plaintext,                              FIPS_DES_DECRYPT_LENGTH );    DES_DestroyContext( des_context, PR_TRUE );    if( ( des_status != SECSuccess ) ||        ( des_bytes_encrypted != FIPS_DES_ENCRYPT_LENGTH ) ||        ( PORT_Memcmp( des_computed_ciphertext, des_ecb_known_ciphertext,                       FIPS_DES_ENCRYPT_LENGTH ) != 0 ) )        return( CKR_DEVICE_ERROR );    /******************************************************/    /* DES-ECB Single-Round Known Answer Decryption Test: */    /******************************************************/    des_context = DES_CreateContext( des_known_key, NULL, NSS_DES, PR_FALSE );    if( des_context == NULL )        return( CKR_HOST_MEMORY );    des_status = DES_Decrypt( des_context, des_computed_plaintext,                              &des_bytes_decrypted, FIPS_DES_DECRYPT_LENGTH,                              des_ecb_known_ciphertext,                              FIPS_DES_ENCRYPT_LENGTH );    DES_DestroyContext( des_context, PR_TRUE );    if( ( des_status != SECSuccess ) ||        ( des_bytes_decrypted != FIPS_DES_DECRYPT_LENGTH ) ||        ( PORT_Memcmp( des_computed_plaintext, des_ecb_known_plaintext,                       FIPS_DES_DECRYPT_LENGTH ) != 0 ) )        return( CKR_DEVICE_ERROR );    /******************************************************/    /* DES-CBC Single-Round Known Answer Encryption Test. */    /******************************************************/    des_context = DES_CreateContext( des_known_key,                                     des_cbc_known_initialization_vector,                                     NSS_DES_CBC, PR_TRUE );    if( des_context == NULL )        return( CKR_HOST_MEMORY );    des_status = DES_Encrypt( des_context, des_computed_ciphertext,                              &des_bytes_encrypted, FIPS_DES_ENCRYPT_LENGTH,                              des_cbc_known_plaintext,                              FIPS_DES_DECRYPT_LENGTH );    DES_DestroyContext( des_context, PR_TRUE );    if( ( des_status != SECSuccess ) ||        ( des_bytes_encrypted != FIPS_DES_ENCRYPT_LENGTH ) ||        ( PORT_Memcmp( des_computed_ciphertext, des_cbc_known_ciphertext,                       FIPS_DES_ENCRYPT_LENGTH ) != 0 ) )        return( CKR_DEVICE_ERROR );    /******************************************************/    /* DES-CBC Single-Round Known Answer Decryption Test. */    /******************************************************/    des_context = DES_CreateContext( des_known_key,                                     des_cbc_known_initialization_vector,                                     NSS_DES_CBC, PR_FALSE );    if( des_context == NULL )        return( CKR_HOST_MEMORY );    des_status = DES_Decrypt( des_context, des_computed_plaintext,                              &des_bytes_decrypted, FIPS_DES_DECRYPT_LENGTH,                              des_cbc_known_ciphertext,                              FIPS_DES_ENCRYPT_LENGTH );    DES_DestroyContext( des_context, PR_TRUE );    if( ( des_status != SECSuccess ) ||        ( des_bytes_decrypted != FIPS_DES_DECRYPT_LENGTH ) ||        ( PORT_Memcmp( des_computed_plaintext, des_cbc_known_plaintext,                       FIPS_DES_DECRYPT_LENGTH ) != 0 ) )        return( CKR_DEVICE_ERROR );    return( CKR_OK );}